Autoimmune diseases like multiple sclerosis (MS) and inflammatory bowel disease (IBD) occur because of an inappropriate immune-mediated attack against self-tissue. Analyses of genetically identical twins shows that besides genetics there are important environmental factors that contribute to MS and IBD development. Vitamin D availability due to sunshine exposure or diet may play a role in the development of MS and IBD. Compelling data in mice show that vitamin D and signaling through the vitamin D receptor dictate the outcome of experimental MS and IBD. Furthermore, the evidence points to the direct and indirect regulation of T cell development and function by vitamin D. In the absence of vitamin D and signals delivered through the vitamin D receptor, auto reactive T cells develop and in the presence of active vitamin D (1,25(OH)(2)D(3) ) and a functional vitamin D receptor the balance in the T cell response is restored and autoimmunity avoided.