At least in the United States the FAA recently (I think in 2012?) changed the recommendation for transponder operation in the AIM. It now reads:
Civil and military transponders should be turned to the “on" or normal altitude reporting position prior to moving on the airport surface to ensure the aircraft is visible to ATC surveillance systems. IN ALL CASES, WHILE IN CONTROLLED AIRSPACE EACH PILOT OPERATING AN AIRCRAFT EQUIPPED WITH AN OPERABLE ATC TRANSPONDER MAINTAINED IN ACCORDANCE WITH 14 CFR SECTION 91.413 MUST OPERATE THE TRANSPONDER, INCLUDING MODE C IF INSTALLED, ON THE APPROPRIATE CODE OR AS ASSIGNED BY ATC. IN CLASS G AIRSPACE, THE TRANSPONDER SHOULD BE OPERATING WHILE AIRBORNE UNLESS OTHERWISE REQUESTED BY ATC.
(Cribbed from Chapter 4-1 of the AIM)
So, basically "Turn it on before you taxi, and turn it off right before you shut down the engine. Always use the Altitude mode (Mode C) unless ATC tells you otherwise."
In practice having the transponder on while on the airport surface doesn't do much unless your field has something like ASDE-X which plots aircraft transponders on a screen in the tower, but it generally doesn't hurt anything and it ensures you don't forget to turn the transponder on when you take off.
Operating your transponder while on the ground may cause "ground clutter" on nearby radar station's displays (possibly setting off the conflict-alert system) - this is why many of us were taught to set our transponders to standby mode while on the ground. In practice this usually isn't an issue, and if it is a problem local ATC will ask you to "squawk standby while taxiing" to resolve the issue.
If anyone gives you a hard time about it copy the number and politely quote the AIM.