"The results of this systematic review show that low vitamin D levels might contribute to the development of dementia."
Whilst slightly off-topic when it comes to the core research material typically included on this blog, I did want to bring to your attention the systematic review and meta-analysis results published by Isolde Sommer and colleagues  (open-access) for your perusal. Although unable to "identify a single study investigating the association between sunlight exposure and dementia risk" authors did manage to find "indirect evidence from studies using vitamin D status as a surrogate parameter" where five out of six studies identified ("18,639 participants") suggested a possible correlation. Sunlight by the way, is the primary route of synthesising vitamin D.
The sort of 'risk' determined in the Sommer calculations when it comes to vitamin D levels and dementia is not to be sniffed at: "Translated into absolute numbers, 28 (at least 10 but up to 50 more) out of 1000 people with serious vitamin D deficiency would develop dementia compared with 1000 people with sufficient D levels over 18.03 years" despite some cautions around the quality of the studies reviewed.
Caveats? Well, examining just one variable (vitamin D status) when it comes to a nebulous condition like dementia has to be kept in mind when interpreting such data and another pet topic of mine - how one assays for vitamin D - is also mentioned: "There is still an ongoing debate regarding the method of choice but a recent comparison between liquid chromatography– tandem mass spectrometry (LC-MS/MS) methods and immunoassays showed variable performance of immunoassays apart from the radioimmunoassay that achieved a performance similar to LC-MS/MS." Discussions on this topic should also mention the epimers of vitamin D too . Then there is the rather important issue of how the genetics of vitamin D formation/metabolism might also be something to look at  if one assumes some connection between small genetic 'blips' and possible risk, bearing in mind gene expression over just gene mutation might be important .
Minus any medical or clinical advice given or intended (something not given on this blog), I do however find data such as that from Sommer et al potentially important and something that can seemingly be acted upon quite easily (at least in terms of correcting any vitamin D deficiency/insufficiency). There is for example, a growing body of evidence potentially linking vitamin D and cognitive functions (see here) and alongside more population-wide advice being handed out by Government (see here), there seems to be some common sense in ensuring adequate sunlight exposure or vitamin intake.
Finally, minus any scaremongering or making connections where none might exist, specific groups of people where vitamin D deficiency seems to be 'over-represented' (see here and see here for example) might also be eligible for some enhanced screening for dementia in later life if one assumes a possible longitudinal link...
 Sommer I. et al. Vitamin D deficiency as a risk factor for dementia: a systematic review and meta-analysis. BMC Geriatrics. 2017; 17: 16.
 Aghajafari F. et al. Plasma 3-Epi-25-Hydroxycholecalciferol Can Alter the Assessment of Vitamin D Status Using the Current Reference Ranges for Pregnant Women and Their Newborns. J Nutr. 2016 Jan;146(1):70-5.
 Lee YH. et al. Vitamin D receptor polymorphisms and susceptibility to Parkinson's disease and Alzheimer's disease: a meta-analysis. Neurol Sci. 2014 Dec;35(12):1947-53.
 Delgado-Morales R. & Esteller M. Opening up the DNA methylome of dementia. Mol Psychiatry. 2017 Jan 3.
Sommer I, Griebler U, Kien C, Auer S, Klerings I, Hammer R, Holzer P, & Gartlehner G (2017). Vitamin D deficiency as a risk factor for dementia: a systematic review and meta-analysis. BMC geriatrics, 17 (1) PMID: 28086755