Background: Vitamin D has several immunological functions. Data on the relation of vitamin D status and allergy are controversial. Methods: We investigated the association between serum concentrations of 25-hydroxyvitamin D (25-OHD) and allergy in childhood. The study population (n = 819) was part of a randomized, double-blind, placebo-controlled trial where the mothers of offspring with a high risk for allergy received a mixture of probiotics (or placebo) for the last 4 weeks of pregnancy, and the child received this from birth to 6 months. Study subjects were followed for the emergence of sensitization and allergic symptoms for a period of 5 years, with medical examinations at the ages of 3 and 6 months, 2 and 5 years and also in the event of allergic symptoms. Levels of 25-OHD were measured in umbilical cord blood (UCB) samples (n = 724) and serum samples drawn at the age of 2 years (n = 369); the data were categorized into tertiles (T1-T3) and quartiles (Q1-Q4). The relation between 25-OHD levels and sensitization and allergy was analyzed with multivariable logistic regression analysis. Results: 25-OHD levels in T2 in UCB were associated with a higher risk for sensitization by the age of 2 years and allergic disorders by the age of 5 years. In the serum samples, at the age of 2 years, 25-OHD levels in Q3 were associated with a higher risk of sensitization and IgE-mediated allergies by the age of 5 years. Conclusions: The 25-OHD levels in early childhood are associated with the emergence of allergy, but the association appears to be nonlinear.