We have been told to beware of the sun but not getting enough can cause many ailments including depression. Although the best source of vitamin D is the sun, it is not likely that a person can get enough sun to maintain healthy levels of vitamin D. The best way to determine if your vitamin D levels are healthy, is to have your blood level checked. Supplementing with vitamin D is often necessary. The article below from NaturalNews.com talks more about the research and how it can help with depression.
http://www.naturalnews.com/034729_vitamin_D_deficiency_depression_children.html