I basically have 3 batches of chicks that are different ages. The oldest are now about 15 weeks, and only started roosting in the last two weeks. The next oldest are 12 weeks, and they started roosting at about 8 weeks old.
My youngest batch, 6 weeks old, started roosting before 5 weeks old. As soon as I put them in the main coop, I found them lined up on the bar the first night. These chicks also had a roosting toy I made them in their brooder, something the older ones didn't have at first.
So they roost when they feel like it, if you want to encourage the behavior, wait until they are settling in for the night and put them up on the bar. (That's what I did with my oldest chicks, otherwise they'd probably still be sleeping in a pile on the floor) Might take a few days of doing it before they stop jumping down as soon as you let them go, so just be persistent!