Do you have roosting poles in your coop? Mine did that a couple times when I first put them out in the coop, but once I installed roosting poles, higher than the door to the nesting box, they started sleeping on the poles. Typically chickens like to sleep high up.
After they stopped sleeping in the nesting box they would periodically go in and explore. I read somewhere to put a golf ball in the nesting box to train them where to lay on egg, which we did. Initially when they started laying they laid in the coop, not the nesting box, and the eggs were soft. After a few days they started laying in the nesting box, always on top of the golf ball. Our chickens have been laying for a year and still lay on top of the golf ball.