Introduction: Environmental factors and an altered fecal microbiome are believed to be central to the pathogenesis of inflammatory bowel diseases (IBD). Vitamin D and ultraviolet radiation (UVR) are environmental factors that are associated by several pathways, including changes to the gastrointestinal microbiome, with the development and course of IBD. Area covered: This review explores the interaction of vitamin D, and UVR, with the intestinal innate and adaptive immune systems, and how they may influence the gut microbiome and the subsequent development, and progression, of IBD. Expert opinion: Vitamin D and UVR both regulate innate and adaptive immunity through a combination of common and independent mechanisms, with the overall effect being the promotion of immune tolerance. Vitamin D, and to a lesser extent UVR, can modify the gastrointestinal microbiome either directly, or through immune-mediated mechanisms and this may explain the effect on intestinal inflammation in animal models of IBD and some clinical studies. Thus, both vitamin D and UVR exposure can be considered potential ‘master regulators’ of gastrointestinal immunity, fine-tuning the complex interaction between genetics, host immunity and the gut microbiome. Further research and increased understanding of environment-host interactions is essential to achieving the ultimate goal of preventing and curing IBD.