The light lets them have light to eat whenever they want (growing babies etc) but also if it's the right kind of bulb, it can give them warmth, too, which they should have 24x7 for a few weeks. I typically find that at around 3 weeks old, their feathers have come in and they don't need the light on all the time as much as before. At that time, I start turning off the light in the night time to give them the simulated day and night cycle.
They probably go outside to the real natural day and night time somewhere between 3-4 weeks old.