The most well known benefit is Vitamin D, a hormone that helps regulate your body. Vitamin D has countless roles in the body and also heavily affects gene expression.
This means that if you do not get enough Vitamin D, then you will be missing out on a lot of essential bodily functions.

It is quintessential to note that there are many other benefits apart from just Vitamin D, including proper eye function, improved skin condition, and immune function. In fact, Vitamin D can be THE difference between life and death for covid-19 patients!
In general, it is just really smart to go outside and bag a few rays a day. Visit the first link for a summary of the science, or feel free to visit any of the other links for research purposes.
If you can’t bag, then go buy your local Vitamin D supplements!!!
Links: Sun and Brain, ambient light
Hormone.org , Web MD , Medical News Today , NCBI.gov, NCBI.gov , Mercy Medical Center
Scholarly: Oxford Academic , AACR , Science Direct , Taylor and Francis , FEBS online