Your vitamin D levels may decrease as you age, but you can get more vitamin D by spending time in the sun, eating certain foods, and taking a supplement.