Whether you need to turn off the lights or leave them on depends on many different factors. The amount of time you'll be leaving the room, the cost of the electricity, the type of light bulb you use and where the switch is located. That last consideration is important, but not from a financial aspect. If the switch is across the room from the door and it's pitch dark, no matter how much energy you might be saving, the safety factor is very important, so leaving it on until you've completed your task might be the best.
Bulb life expectancy
The life expectancy of some types of bulbs is affected by the number of times you switch it on or off. If you do it frequently, the bulb will have a far shorter operating life. Traditional incandescent lighting doesn't fall into this group. Traditional lighting like this uses the most electricity, primarily because much of the energy it uses is given off in the form of heat. If you've ever touched a hot light bulb, you know it's true. In fact, as much as 90 percent of the energy usage contributes to the heat. In the summer, you'll find that keeping this type of lighting turned off as much as possible can keep your room cooler. However, the change in temperature from turning them on and off frequently may shorten the life a bit.
Compact fluorescent lamps
CFL lighting – compact fluorescent lamps that look like glass coils – is the most energy saving type of lamp. It's a fluorescent bulb that can fit into the traditions screw in bulb base. A general rule for turning these off for conserving energy is to go by the amount of time you'll be out of the room. If it's more than 15 minutes turn it off, less than that and you can leave it turned on. Switching them on and off more frequently is harder on the life of the bulb than leaving it on for more extended periods. Halogen lighting is almost in the middle of the traditional incandescent lighting and CFL lighting. It's more efficient than the traditional light bulb, but not as efficient as CFL lighting. The actual savings is based on the cost of the energy used.
With the current global situation regarding climate change and energy consumption, most people will tell you to conserve energy you should always turn lighting off when you’re not in the room, however, as mentioned above, safety comes first and leaving a light on is more preferable if it helps to prevent accidents.