In 1860, Florence Nightingale wrote in Notes on Nursing:
"It is the unqualified result of all my experience with the sick, that second only to their need of fresh air is their need of light; that, after a close room, what hurts them most is a dark room, and it is not only light but direct sunlight that they want. . . . People think that the effect is upon the spirits only. This is by no means the case. The sun is not only a painter but a sculptor."
We usually think of light as important mostly for vision, but light actually affects our whole system. You only have to remember that jaundiced babies are treated with light to know that light passes right into our bodies. Our individual cells and many proteins inside our bodies have light-sensitive chemical switches that stimulate bodily enzymes, turn cell processes on and off, and affect which chemicals our cells produce. One 2016 study even showed that light penetrates into our brains, particularly through our ear canals, and that this light impacts our emotional reactivity. Other studies have shown that exposure to light has an impact on the blind, too.
Some studies show that light speeds healing, decreases pain, and (when exposed at the right time of day) improves sleep. Exposure to sunlight helps our bodies to produce vitamin D, an essential nutrient. On the other hand, light deprivation has some severe effects, including depression, sleep fragmentation, brain damage, and even a shorter life. In a 2016 Swedish study, nonsmokers who avoided sunlight had a similar life expectancy to smokers in the highest sun exposure group. In other words, lack of sun may be a risk factor for death as damaging as smoking.
There are light-based therapies using lasers or LEDs to treat conditions as diverse as traumatic brain injury, Alzheimers, depression, hair regrowth, and wound healing.
So get out there and enjoy the sunshine! It's good for your spirit, your long-term health, and for your brain.
https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4767140/ (Human Brain Reacts to Transcranial Extraocular Light)