Light, hormones, and sleep are important for getting a good night's rest. Sunlight helps our body control melatonin, a hormone that makes us sleepy. When it's bright outside, we make less melatonin and feel more awake. When it gets dark, our body makes more melatonin, helping us get ready for bed. This means sunlight is helpful for sleep.
But blue light from screens, like phones and computers, can mess with our sleep. It reduces melatonin, making it harder to fall asleep and leading to not enough sleep.