Background: Suboptimal vitamin D levels during critical periods of immune development have emerged as an explanation for higher rates of allergic diseases associated with industrialization and residing at higher latitudes.Objective: We sought to determine the effects of early postnatal vitamin D supplementation on infant eczema and immune development.Methods: By using a double-blind randomized controlled trial, newborn infants were randomized to receive vitamin D supplementation (400 IU/d) or a placebo until 6 months of age. Some infants also wore personal UV dosimeters to measure direct UV light (290-380 nm) exposure. Infant vitamin D levels were measured at 3 and 6 months of age. Eczema, wheeze, and immune function outcomes were assessed at 6 months of age.Results: At 3 (P < .01) and 6 (P = .02) months of age, vitamin D levels were greater for the vitamin D–supplemented group than the placebo group, but there was no difference in eczema incidence between groups. Infants with eczema were found to have had less UV light exposure (median, 555 Joules per square meter [J/m2; interquartile range, 322-1210 J/m2]) compared with those without eczema (median, 998 J/m2 [interquartile range, 676-1577 J/m2]; P = .02). UV light exposure was also inversely correlated with IL-2, GM-CSF, and eotaxin production to Toll-like receptor ligands.Conclusion: This study is the first to demonstrate an association between greater direct UV light exposures in early infancy with lower incidence of eczema and proinflammatory immune markers by 6 months of age. Our findings indicate that UV light exposure appears more beneficial than vitamin D supplementation as an allergy prevention strategy in early life.