This is getting away from my personal experience because I've never had this problem. Some people on this forum have had trouble with chickens going into the coop to go to bed when the coop is really dark. It gets so dark inside the coop that the chickens can't see to go to bed, although it is still fairly light outside. I think sometimes street lights and security lights that keep it light outside contributes to this problem. These people report that when they put a dim light in there or a window so they can see well enough to go to bed, this problem goes away.
I don't leave lights on, but I have a window. My parents did not leave a light on, but they left the door open and had some small windows high up. You don't have to have lights, but a window so you can see to work in there and they can see a bit is a good idea.
Something I have seen and this has nothing to do with lights. When I let brooder raised chicks first free range, they don't all necessarily go back into the coop when it gets dark. Most do and most of the time they all do, but I have had some go to sleep outside the coop in the run. They are real easy for me to physically catch and put in the coop and they usually catch on pretty quickly. I never have this problem with broody raised chicks and this only happens when they have not yet started to roost. I think part of this it is because their instincts tell them to find a low spot kind of hidden, like a corner in the coop or run, where they can huddle together if they are not yet roosting. To these , I think the ground outside my raised grow-out coop looks cozier than inside the raised coop. Since most of them go inside and they all go inside after a little training, I don't think it's a light problem.
Something else I've seen when I first let them outside the coop. Although they may have gone in and out of a gate or door several times during the day, when it comes to bedtime and before it is too dark to see, they don't know how to get into the coop. They want to real bad, but they have no concept of gate or door. They may wind up on the opposite side of my run away from the gate and don't know to walk around to the gate. Or instead of flying up to the door of my raised grow-out coop or climbing the tree limb I use as a ladder, they try to fly up to the window or into the sides of the coop. The first two or three nights when I first let them out to roam, I'm always there so I can help them find their way back to the coop. It usually only takes a couple of times for even the really slow ones to catch on, and they want to get into the coop real bad. This does not happen to all of them and a lot of times, it does not happen to any of them, but it happens often enough.
I don't leave lights on, but I have a window. My parents did not leave a light on, but they left the door open and had some small windows high up. You don't have to have lights, but a window so you can see to work in there and they can see a bit is a good idea.
Something I have seen and this has nothing to do with lights. When I let brooder raised chicks first free range, they don't all necessarily go back into the coop when it gets dark. Most do and most of the time they all do, but I have had some go to sleep outside the coop in the run. They are real easy for me to physically catch and put in the coop and they usually catch on pretty quickly. I never have this problem with broody raised chicks and this only happens when they have not yet started to roost. I think part of this it is because their instincts tell them to find a low spot kind of hidden, like a corner in the coop or run, where they can huddle together if they are not yet roosting. To these , I think the ground outside my raised grow-out coop looks cozier than inside the raised coop. Since most of them go inside and they all go inside after a little training, I don't think it's a light problem.
Something else I've seen when I first let them outside the coop. Although they may have gone in and out of a gate or door several times during the day, when it comes to bedtime and before it is too dark to see, they don't know how to get into the coop. They want to real bad, but they have no concept of gate or door. They may wind up on the opposite side of my run away from the gate and don't know to walk around to the gate. Or instead of flying up to the door of my raised grow-out coop or climbing the tree limb I use as a ladder, they try to fly up to the window or into the sides of the coop. The first two or three nights when I first let them out to roam, I'm always there so I can help them find their way back to the coop. It usually only takes a couple of times for even the really slow ones to catch on, and they want to get into the coop real bad. This does not happen to all of them and a lot of times, it does not happen to any of them, but it happens often enough.