Vitamin D status, the vitamin D receptor (VDR), and the ability to produce active vitamin D [1,25(OH)2D, regulated by Cyp27b1] regulate fetal and adult hematopoiesis. Transgenic reporter mice that express the tdTomato RFP as an indication of Vdr expression were used to identify immune cells that express the Vdr. Vdr/tdTomato+ hematopoietic progenitors were identified as early as embryonic day (E)15.5, establishing that these cells have expressed the Vdr and are vitamin D targets. Maternal vitamin D deficiency [D-; serum 25(OH)D < 20 ng/ml] or Vdr knockout or Cyp27b1 knockout resulted in embryos with fewer fetal progenitors. Vdr/tdTomato+ expression was found to increase with age in CD8+ T cells and innate lymphoid cells (ILCs)1 and ILC3, suggesting that initial Vdr expression in these cells is dependent on environmental factors immediately postbirth. In adult tissues, the frequencies of mature T cells and ILCs as well as Vdr/tdTomato expression were reduced by D-. Maternal D- resulted in fewer progenitors that expressed Vdr/tdTomato+ at E15.5 and fewer Vdr/tdTomato+ immune cells in the adult spleen than offspring from D+ mice. We challenged D- mice with H1N1 influenza infection and found that D- mice were more susceptible than D+ mice. Treating D- mice with vitamin D restored Vdr/tdTomato+ expression in splenic T cells and partially restored resistance to H1N1 infection, which shows that developmental D- results in lingering effects on Vdr expression in the adult immune system that compromise the immune response to H1N1 infection. Vitamin D and the Vdr regulate hematopoiesis in both fetal and postnatal phases of immune cell development that impact the immune response to a viral infection.