Hello there and welcome to BYC!
Something may have orginally scared them enough to convince them it's not safe to sleep in there at night. Predators may have been sniffing or digging at night. There must be something they don't like about it or makes them nervous about roosting in the coop.
Chickens are creatures of habit and will sleep where ever they did last night because they are still alive today. You will need to retrain them at this point by getting them all locked in there at night.
I would try and lure them in with treats in the afternoon. Lock them in and get them to sleep in there for several nights in a row. (You can let them out during the day.) Once they have roosted in the coop for a week, they should return to it each night. However try to figure out why this is happening.