Vitamin D seems to be the "hot" new supplement, whether it is our old friend contained in cod liver oil, or in calves' liver,or in pills of Vitamin D, or in the form of Vitamin D1, D2, or D3. There was a recent overview and critique of the many studies of this vitamin which was published in the New England Journal of Medicine by R.P. Heaney: NEJM vol 367, no. 1, pp 77-78 (July 5, 2012). I will try to summarize his article as well as to add some observations of my own, and I will make no statements that cannot be verified by reference to the scientific literature or that have not been validated by clinical studies and tests. (Standard disclaimer---I have no vested monetary interest in whether or not you buy and ingest any form of Vitamin D.)
You should all be made aware that Vitamin D is similar to Vitamin A and vitamin E in that it is fat-soluble and hence stored in your liver. Unlike the B vitamins or Vitamin C , it is not immediately excreted by your kidneys if ingested to excess, but rather the excess is stored in your liver. In fact so much Vitamin A and D can be stored in the liver of an animal that Eskimos have died from ingesting the liver of polar bears that they have killed. And we know from separate clinical studies that hypervitaminosis A can harm you, and that excess dietary supplements of Vitamin E can increase your risk of having a heart attack. So far the only demonstrated damage from prolonged ingestion of excessive amounts of Vitamin D is band keratopathy, or deposits in your cornea.
Vitamin D is needed, along with calcium and phosphorous, to form bones that are not thin and subject to fracture (osteoporosis) and that do not bend under the normal load of supporting the body (rickets). The process of normal bone formation is regulated by parathyroid hormone, which is secreted by four glands situated in your thyroid gland, usually two on each side. Vitamin D is not a true vitamin because unlike all the other vitamins it can be synthesized by your body from cholesterol and sunlight, which is not to say that we all have enough of it. When taking supplements we usually ingest Vitamin D2 or D3. The amount of dynamic Vitamin D that is available to you for bone synthesis and strength is determined by measuring your blood level of 25-OH (hydroxy) Vitamin D, and then taking Vitamin D supplements if your 25-OH level is low. With regard to sunlight, the latest studies indicate that after age 35 it is too late to reduce your risk of skin cancer by reducing the amount of UV sunlight that strikes your skin, and the majority of the damage has already been done by age 18.
It has never been shown that once you have a normal level of Vitamin D in your body that taking additional Vitamin D as a supplement has any positive effect. There is a meta-analysis showing that taking 800 IU of vitamin D was "somewhat favorable in preventing hip fracture", but "somewhat favorable" is a very imprecise scientific statement. In addition, I have shown elsewhere that all meta-analyses have inherent statistical weaknesses, and should only be used to generate a hypothesis which then should be tested by a properly constructed double-blind clinical study.
There are correlations of low levels of vitamin D with certain medical findings in addition to osteoporosis, but it has never been shown that taking vitamin D prevents or reverses these conditions. Some of these conditions are Alzheimer's Disease, immune response, and pre-eclampsia. Once again I must remind my readers that correlation is not causation, and that moving the arrow over the elevator door in the lobby of a building does not move the elevator.