Vitamin D is somewhat unique among the vitamins in that it requires exposure to ultraviolet light for the body to properly metabolize. Since people have started spending less and less time outside (and when they are outside they tend to wear sunscreen or stay in the shade), there has been a noticeable increase in Vitamin D deficiencies and related disorders. Insufficient Vitamin D causes problem like ‘rickets’ and aggravates a long list of other health issues.
It was because of this (rickets, specifically) that the US government started mandating that Vitamin D be added to milk and dairy products in the 1930′s, and it virtually eliminated the rickets problem at the time. Vitamin D can also be found in oily fish (cod, salmon, tuna, etc), egg yolk and liver. However, consuming enough dietary Vitamin D does not mean your body has enough of what it needs (the metabolites D2 &/or D3). Also, since it is fat-soluble, there is a chance of consuming too much Vitamin D.
When the body is exposed to ultraviolet light on average for even a few minutes a day, it can convert the dietary Vitamin D to the metabolites that the body can use. There is no chance of overdosing on Vitamin D due to too much exposure to light since the body will only convert as much as it needs and will waste the rest.
The easiest way to make sure that your body has enough Vitamin D is to eat a healthy diet and make sure you expose yourself to UV light in some manner; either outside in sunlight, or by using something like a UVBioTek phototherapy system.
(reference: http://dietary-supplements.info.nih.gov/factsheets/vitamind.asp)

