When I first started studying nutrition, the advice at the time for Vitamin D was 400iu per day. The only conditions associated at that time were rickets (calcium/bone). Harvard researchers started the Vitamin D Council (http://www.vitamindcouncil.org) in which the research has shown that Vit D is not associated with just rickets but a whole host of conditions, furthermore the recommended doses of the vitamin is way beyond the 400iu. It is important to note that magnesium and vitamin d are synergistic, magnesium is a critical element and is deficient in most people due to several factors such as high stress, poor dietary intake and deficiency of co-nutrients. http://www.vitamindcouncil.org/about-vitamin-d/vitamin-d-cofactors/magnesium/
One of the main therapeutic values of Vitamin D is neurological, among these are anxiety, cognitive impairment, dementia, adhd and depression. The Vitamindcouncil.org has an extensive catalog of articles concerning Vitamin D and Vitamin D and neurological conditions.
Here is an excerpt - read full article here