Yes, going out in the sunshine for a while is a good way to get vitamin D. From Science Daily:
Link between vitamin D, dementia risk confirmed
Vitamin D deficiency is associated with a substantially increased risk of dementia and Alzheimer's disease in older people, according to the most robust study of its kind ever conducted. An international team found that study participants who were severely vitamin D deficient were more than twice as likely to develop dementia and Alzheimer's disease.
The team studied elderly Americans who took part in the Cardiovascular Health Study. They discovered that adults in the study who were moderately deficient in vitamin D had a 53 per cent increased risk of developing dementia of any kind, and the risk increased to 125 per cent in those who were severely deficient.
Similar results were recorded for Alzheimer's disease, with the moderately deficient group 69 per cent more likely to develop this type of dementia, jumping to a 122 per cent increased risk for those severely deficient.
The study was part-funded by the Alzheimer's Association, and is published in Neurology, the medical journal of the American Academy of Neurology. It looked at 1,658 adults aged 65 and over, who were able to walk unaided and were free from dementia, cardiovascular disease and stroke at the start of the study. The participants were then followed for six years to investigate who went on to develop Alzheimer's disease and other forms of dementia.... Previous research established that people with low vitamin D levels are more likely to go on to experience cognitive problems, but this study confirms that this translates into a substantial increase in the risk of Alzheimer's disease and dementia.
Vitamin D comes from three main sources -- exposure of skin to sunlight, foods such as oily fish, and supplements. Older people's skin can be less efficient at converting sunlight into virVitamin D, making them more likely to be deficient and reliant on other sources. In many countries the amount of UVB radiation in winter is too low to allow vitamin D production.
The study also found evidence that there is a threshold level of Vitamin D circulating in the bloodstream below which the risk of developing dementia and Alzheimer's disease increases. The team had previously hypothesized that this might lie in the region of 25-50 nmol/L, and their new findings confirm that vitamin D levels above 50 nmol/L are most strongly associated with good brain health....During this hottest of summers, hitting the beach for just 15 minutes of sunshine is enough to boost your vitamin D levels.