I'm a little late in getting to the paper by Thomas Littlejohns and colleagues  (open-access) reporting that: "vitamin D deficiency is associated with a substantially increased risk of all-cause dementia and Alzheimer disease". The media have been all over this study as per the BBC commentary (see here) and some rather more critical discussion by the NHS Choices website (see here).
I don't need to add anything further to discussions aside from saying that correlation might not necessarily be the same as causation and any mechanism linking vitamin D status and cognitive abilities is still something to be determined. But that's not to say that there aren't interesting things afoot for vitamin D outside of it's more traditional skeletal effects...
 Littlejohns TJ. et al. Vitamin D and the risk of dementia and Alzheimer disease. Neurology. 2014. August 6.