Does sunlight affect your hormones, and if so, how?
Sunlight affects multiple hormones simultaneously: it stimulates vitamin D and beta-endorphin, suppresses melatonin, and can raise cortisol with chronic exposure. A daily dose of sun is beneficial, but prolonged, unprotected sun exposure also has downsides.
Sunlight uses UV radiation to convert a precursor in your skin into vitamin D3. That substance is then processed by the liver and kidneys into calcitriol, the active hormonal form that regulates the absorption of calcium and phosphate. Without sufficient sun exposure, this system becomes deficient, which is one of the best-documented hormonal effects of sunlight.
At the same time, UV exposure causes your skin to produce a protein that is split into two hormone-like substances: alpha-MSH (responsible for tanning) and beta-endorphin, the body's own painkiller. That beta-endorphin explains why sunbathing feels pleasant or even addictive for many people. This mechanism is well supported by multiple studies.
Light and darkness also determine how much melatonin you produce. Melatonin is the sleep hormone: production drops in daylight and rises in the dark. Artificial blue light in the evening has a similarly suppressive effect as excessive daytime exposure. The parallel with vitamin D deficiency is a hypothesis put forward by researchers, not an established fact.
With prolonged, chronic UV exposure, your skin activates its own stress system, which releases cortisol. Cortisol is your stress hormone. Chronically elevated cortisol levels can inhibit the formation of new brain cells and impair cognitive function. What exact dose or duration of sun exposure causes this is not yet clear.
Finally, UV radiation also influences neurotransmitters such as dopamine and glutamate through those same pathways, which play a role in mood, learning and memory. Whether the net effect is positive or negative depends strongly on the amount of exposure. This area is still poorly studied and is largely based on reviews rather than large clinical trials. A special case is melasma: in women with darker skin, sunlight and oestrogen together can cause patchy pigmentation that is stubborn and often recurs.
Claims based on PMIDs 22716179, 36235587, 33320376, 23539007, 40681402, 38892387, 31735001, 27356601. Vitamin D and beta-endorphin/alpha-MSH are strongly supported. Melatonin, cortisol and neurotransmitter effects are moderately to limitedly supported (reviews, mechanistic studies). No large RCTs exist for the cortisol and neurotransmitter effects.