They would prefer to be able to sleep in the dark just as we do. Lights are really not necessary at all. Some people will use a light to encourage them to lay over the winter months, while others prefer to allow them to take a natural break from laying, to ensure good health - i.e., laying is a highly intensive process that takes a toll on their bodies and allowing them to take a natural break can prevent some of the egg laying issues.
Those who do put lights in the coop, usually have it on a timer that comes on around 4am and shuts off by 8am. By then the natural daylight should provide enough light. If you don't have windows in your coop and it is dark all the time, you might want to let it stay on all day, but have it shut off after they have all had a chance to get on the roosts at night.