Not sure what you're describing here but it sounds like they were choosing to sleep on top of the brooder instead of going in the coop?  What most people do to teach a chicken that its new home is the coop (once its fully feathered and ready for the coop life), they put the chickens in the coop with food and water, then close off access to the outside range or run for 7 or 8 days.  After that time, open the pop doors to the run so they can go outside at will.  They should then look to go inside the coop on their own at dusk.  You'll have some that may huddle together on the ground in the corner of the run the first couple of times it gets dark outside, but after 2 or 3 nights of you picking them up after dark and putting them in the coop, they will figure out what time is the time they need to go in before its too dark for them to see their way inside.  Having a light inside the coop helps them find their way inside when its dark outside, but I don't use a light. Lights on a timer will instantly go off, leaving them in the dark suddenly.  The sun sets slowly, gradually dimming. I don't want them moving around in the coop then suddenly being in pitch black and can't see anything. In the winter I use a light on a time to extend their exposure to light which increases egg production, but I make the light come on prior to sun rise.  It goes out after the sun is up, extending their natural day but still letting the day end with the setting sun.