While the connection between sunshine and mental health still needs more research, there is enough evidence to make us consider daily sunlight is part of our routine. Lack of sunlight has been linked to many conditions including depression, obesity, diabetes, and even cancer.
One reason sunlight is linked to improved mood is it’s observed connection to serotonin, one of the primary chemicals that affect mood.
One Australian study that measured levels of brain chemicals flowing directly out of the brain found that people had higher serotonin levels on bright sunny days than on cloudy ones. That effect remained no matter how cold or hot the weather was.
https://time.com/4888327/why-sunlight-is-so-good-for-you/
Sunlight is also a natural source of Vitamin D, which Americans tend to be deficient in.
Sunshine has been suggested as an approach to maintain healthy vitamin D levels. Holick (2004) reported that sun exposure to the arms and legs for five to ten minutes, two or three times per week, may be beneficial for maintaining vitamin D sufficiency. However, because the time of day, season, and latitude influence sunlight absorption and thus, the amount of vitamin D produced, it becomes difficult to make universal recommendations.
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2908269/
Recommendations are tricky because health professionals are also concerned about the sun and the risk of skin cancer.
Sunlight contains two forms of radiant energy, ultraviolet A (UVA) and ultraviolet B (UVB). UVB provides the energy your skin needs to make vitamin D, but that energy can burn the skin and increase the cell damage that leads to cancer. UVA also contributes to skin damage and premature aging.
To protect yourself, avoid the summer sunshine, especially between 10 a.m. and 2 p.m. Whenever possible, wear a large-brimmed hat and a tightly woven, dark-colored long-sleeve shirt and long pants when you go out in the sun.
But summer garb is usually lightweight and exposes a lot of skin. That’s where a sunscreen comes in. Look for a product with an SPF of at least 15; fair-skinned people would be wise to shoot for 30 or higher. But since SPFs apply only to UVB, look for a “broad spectrum” sunscreen that also protects against UVA; most contain titanium dioxide, zinc oxide, or avobenzone (also known as Parsol 1789). Above all, apply your sunscreen early, often, and liberally.
https://www.health.harvard.edu/staying-healthy/vitamin-d-and-your-health-breaking-old-rules-raising-new-hopes
There is still much to learn about sunlight and its effects on health, and protections against skin cancer must be observed. Still, especially during a time when we may be more isolated and outside less, it may be wise to keep an eye on your mood as it relates to getting some sun. This may be especially true if you are prone to Seasonal Affective Disorder, the type of depression that seems to be most responsive to light treatment.
Wanna Deep Dive?
Vitamin D and your health: Breaking old rules, raising new hopes
Vitamin D and Depression: Where is all the Sunshine?
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2908269/
Why Sunlight Is So Good For You