Vitamin D gets the attention, but the best-established benefit of daylight has nothing to do with your skin — it's your body clock. Bright light in the first hours after waking is the strongest, most reliable signal you can send it, and it's cheap, fast, and hard to overdo.
A cluster of special cells in your eyes (intrinsically photosensitive retinal ganglion cells) measure environmental brightness and set the timing of your internal clock. Bright morning light pulls your clock earlier — advancing your natural sleep and wake times — and reinforces a strong day/night contrast. The practical results people report and studies associate with it: falling asleep more easily at night, waking more easily in the morning, and steadier daytime alertness.
The catch is intensity. A bright office is ~500 lux; an overcast morning outdoors is ~10,000 lux; direct sun can exceed 100,000. Your clock responds to the outdoor range, so even a dim, cloudy morning outside beats sitting by a window. The consensus target researchers use is on the order of ~250+ melanopic lux at the eye during the day, and low light in the evening — a bar you basically can't hit indoors by day, and easily blow past with phones at night.
Morning light is well-established for circadian timing; the downstream sleep effects are strong but vary by person, chronotype and consistency. It's a lever, not a cure — and the way to know if it's working for you is to track it against your own sleep over a few weeks.