Getting enough sunlight is important in order to maintain production of serotonin and Vitamin D. Serotonin is a neurotransmitter (brain chemical) that is associated with many important functions, such as sleep, mood, appetite, sex drive, and muscle contraction. Chronic pain is often medicated with selective serotonin reuptake inhibitors (SSRIs), and it's known that pain and depression often go hand in hand. A simple way to put it is: if you're feeling down, the same pain signals (same sensory input) feels way stronger than if you're feeling happy. That's why there's so much yadda yadda about positive thinking involved in chronic pain management.
So seretonin is important, it makes us feel good. And far from having to go on Prozac or anything like that for the rest of our lives, we may benefit a lot just from soaking up the sunlight in small doses when we can, because serotonin is produced when daylight hits the optic nerve.
Staying indoors where a normal living room has 50-80 lux (light units) may feel like it's bright enough for you, but outside in the daylight, even without direct sunlight, you are exposed to 10,000–25,000 lux... which is like... ehem... 200 to 500 times more... And direct sumlight has 32,000–130,000 lux... phew... that's not even comparable to indoor lighting.
Sunlight is also the best way to secure production of Vitamin D. Researchers at the Mayo clinic have linked chronic pain to Vitamin D insufficiency, and lack of Vitamin D is also linked with higher mortality from heart disease.
Doctors say that it's nearly impossible to get adequate amounts of vitamin D from your diet, and that sunlight exposure is the only reliable way to generate vitamin D in your own body. Apparently 10 minutes of sunlight midday in the summer is enough for most people to produce sufficient Vitamin D.
Okay, so this might not be so easy for those of us who live in the cold and dark northern countries - during the winter atleast... but it just means we need to take the opportunities that we get, put on our good shoes, go outside and soak up the sunlight.