We have a competition between the price of the bulb, the shortened life span of a bulb being turned off and on, and the price of electricity to keep the bulb on.
April 2009 Reader's Digest made a distinction between incandescent bulbs and the new CFL bulbs.
Incandescent bulbs are cheap to buy but more costly to keep on. Turning these off more often shortens their life span but they are cheaper to replace than the electricity they sap being turned on. The CFL bulbs are more costly to buy and cheaper to keep on. Turning these off less often is good if you return shortly to the work area because you don't want to have to replace these costly ones as often.
Reader's Digest gave this rule of thumb:
Turn off incandescents if you will be gone more than 5 seconds.
Turn off fluorescents if you will be gone more than 15 minutes.