The relationship among social determinants, vitamin D serum concentration and the health and nutrition conditions is an important issue in the healthcare of pregnant women and newborns. Thus, the present study analyses how vitamin D, prenatal monitoring and social determinants are associated with birth weight. The cohort comprised 329 pregnant women, up to 34 weeks gestational age at the time of admission, who were receiving care through the prenatal services of Family Health Units. Structural equation modelling was used in the statistical analysis. The mean birth weight was 3340 (sd 0·545) g. Each nmol increase in maternal vitamin D serum concentration was associated with an increase in birth weight of 3·06 g. Prenatal healthcare with fewer appointments (β −41·49 g, 95 % CI −79·27, −3·71) and late onset of care in the second trimester or third trimester (β −39·24 g, 95 % CI −73·31, −5·16) favoured decreased birth weight. In addition, low socio-economic class and the practice of Afro-Brazilian religions showed a direct association with high vitamin D serum concentrations and an indirect association with high birth weight, respectively. High gestational BMI (β 23·84, 95 % CI 4·37, 43·31), maternal education level (β 24·52 g, 95 % CI 1·82, 47·23) and length of gestation (β 79·71, 95 % CI 52·81; 106·6) resulted in high birth weight. In conclusion, maternal vitamin D serum concentration, social determinants and prenatal care, evaluated in the context of primary healthcare, directly determined birth weight.