Because your skin reacts to sunlight by producing serotonin, which over the course of the day, converts to melatonin. Just as the following study states.
Melatonin is the hormone that is critical in getting you to sleep, and then making sure you have the deepest sleep possible.
And without that early dose of sunlight, the lack of serotonin will lead to melatonin building up too late into the night, wrecking your chances of waking up with a clear head.
This is an excellent example of simple actions having far-reaching consequences.
What you do at the very start of the day heavily influences how well you’ll do on the following day.