Vitamin D helps to maintain calcium levels along with having over 200 other important functions. In fact, vitamin D deficiency is estimated to cause 85,000 excess cancer deaths a year in the U.S., as well as increasing the risk of diabetes, osteoporosis, hypertension, multiple sclerosis and a host of other ills. If the dose of vitamin D goes too high, one can see an increased risk of kidney stones. The key is at what dose this can occur.
The research shows increased kidney stone risk in people getting 50,000 units a day for long term, and I have found no evidence that this occurs at doses of 10,000 units a day or less. Because of this, I would not worry about taking 5,000 units of vitamin D or less a day.
The next question asked is does taking calcium cause calcium kidney stones, and again the answer is no. What can increase stones are foods that increase oxalate levels (e.g., tea). Instead of restricting these healthy foods in the diet, I offer a different option. Placebo controlled studies have shown that taking vitamin B6 at 25 mg a day plus magnesium at 200 mg a day decreased recurrent calcium stones by 90%! These nutrients, plus staying hydrated and treating any bladder infections present, are keys to avoiding calcium kidney stones (the most common type). For those with recurrent bladder infections contributing, a nutritional supplement called "mannose" can often prevent most bladder infections.