Vitamin D deficiency predisposes individuals to type 1 and type 2 diabetes, and receptors for its activated form-1alpha,25-dihydroxyvitamin D3-have been identified in both beta cells and immune cells. Vitamin D deficiency has been shown to impair insulin synthesis and secretion in humans and in animal models of diabetes, suggesting a role in the development of type 2 diabetes. Furthermore, epidemiological studies suggest a link between vitamin D deficiency in early life and the later onset of type 1 diabetes. In some populations, type 1 diabetes is associated with certain polymorphisms within the vitamin D receptor gene. In studies in nonobese diabetic mice, pharmacological doses of 1alpha,25-dihydroxyvitamin D3, or its structural analogues, have been shown to delay the onset of diabetes, mainly through immune modulation. Vitamin D deficiency may, therefore, be involved in the pathogenesis of both forms of diabetes, and a better understanding of the mechanisms involved could lead to the development of preventive strategies.