Yes they need them to sleep. They can and will sleep on the floor sometimes but if you have nest boxes and no roosts, they will think it's ok to sleep in the nesting boxes. You don't want that because you want the boxes for the laying of eggs only. There are different ways to make roosts. Here's a picture of one of many different shaped ones we have in and outside our coop.
Mine have had roosts since they were 1 week old. They didn't start using them until they were almost 3 months old. They huddled in the corner at night together. Now out of about 15, I still have a couple that like to sleep on the floor. One of mine sleeps on top of the big food bin that's in their coop. I think they should have the choice, it's cleaner.
my silkies like to roost with the big girls...on a 5 ft high 2X4 laid on its side. Yes, chickens will be lots happier on roosts. Oh, I have a ladder to get the silkies up on the high roost.