How Does the Sun Affect Our Mental State?

Scientists have revealed the amount of sunlight needed to improve mood. The study showed that cloudy days reduce life satisfaction.
Sunlight has long been associated with good mood, and science confirms that, but how exactly does the sun affect our mental state?
Scientists from the United States and China analyzed data from about 30,000 people from a survey conducted in the United States, comparing it with records from 824 weather stations across the country. They also compared people's feelings with the amount of sunlight on the day of the survey and the previous week.
Life satisfaction on a scale from 1 ("not satisfied at all") to 5 ("very satisfied").
Depressive symptoms (on a scale from 0 to 24, where higher values indicate more severe conditions, including sadness, feelings of loneliness, sleep problems, and others.
Additional factors: age, income, education, health, weather, air quality, and the season of the survey.
The scientists reached the following key conclusions:
On sunny days (more than 11 hours of sunlight), people felt slightly happier compared to cloudy days.
With less than three hours of sunlight, life satisfaction decreased slightly.
As sunlight increased, life satisfaction levels rose, but the impact was moderate.
Sunlight almost did not affect depressive symptoms on the day of the survey, but clear weather during the previous week significantly reduced their severity.