Most of us are deficient in vitamin D, especially at higher latitudes in the winter. Until recently, vitamin D was thought to mainly play a role in calcium metabolism. But recent investigations have discovered that it plays many important roles in the health of our immune system as well. Chronic vitamin D deficiency leaves us more vulnerable to infectious diseases as well as cancer and perhaps even heart disease. The correlation of colds and flu to winter and rainy season around the world is a prime example of vulnerability to infectious disease because of vitamin D deficiency. The correlation of many cancers by latitude is a strong indication of the effects of vitamin D deficiency in causing cancer.

Sunshine Dilemma
Strong sunlight on our skin is necessary to produce vitamin D but also ages our skin. Diets high in polyunsaturated fat especially make the skin more vulnerable to damage from UV rays in sunlight - another good reason to limit polyunsaturated fat to ancestral intake levels of around 4% or less. Sunburn especially damages the skin, by literally burning the skin and can cause first, second, or third degree burns. So, those with fair skin need to be very careful to avoid sunburn when getting vitamin D from sun exposure.
Supplementing Beyond Sunshine
When adequate sunshine is not available, vitamin D levels need to be maintained by diet and/or supplements for optimal health. The foods highest in vitamin D are mostly animal seafoods, as shown in the table below. The problem is, there are many confounding factors in determining how much dietary vitamin D is necessary to achieve optimal blood levels. Part of this problem is that vitamins D, A, and K2 all interact synergistically and increasing one without increasing the others is more likely to lead to toxicity problems. Getting plenty of calcium and magnesium are also important to prevent toxic effects from high intake of vitamin D. Dairy and animal seafood are excellent sources of these minerals.
Vitamin D in Food
(click to enlarge)
(click to enlarge)

Blood Testing for Vitamin D
The best blood test to indicate vitamin D status is the 25(OH)D (25-hydroxyvitamin D) test. Ideally, 25(OH)D levels should be in the 40 to 60 ng/ml range for optimal health. The cost for this test ranges from about $50 to $150 and is usually not covered by insurance - even though vitamin D status is probably as much or more important than most covered parameters (a sad comment on the poor state of our modern "health care" system). Ideally, testing should be done at least twice a year, once in summer and once in winter.
References and Further Reading
From Seafood to Sunshine - A New Understanding of Vitamin D Safety
On the Trail of the Elusive X-Factor
The Miracle of Vitamin D
Naked at Noon
Use of vitamin D in clinical practice
Here's a little sunshine to hopefully brighten up your day :)
Walking on Sunshine - Aly and AJ