The objective was to investigate associations of serum vitamin D concentration with depressive symptoms and assess the impact vitamin D concentration has on the occurrence of depressive symptoms in 20–44-year-old pregnant mothers, postpartum mothers, women (non-pregnant/postpartum women), and men, including a separate subgroup analysis of postpartum breastfeeding and non-breastfeeding mothers. The study populations were selected from 2007-2018 NHANES public data. Subjective interview data and objective laboratory data, including depressive symptoms, serum vitamin D concentration, nutrient intake, and demographic information were utilized. Two diet patterns were created using principal component analysis and a Bayesian multinomial model was fit to predict depression outcomes for each subpopulation. The estimates for the log vitamin D slope parameter were negative for all cohorts; as vitamin D increased, the probability of having no depression increased, while the probability of depression decreased. The pregnant cohort had the steepest vitamin D slope, followed by postpartum, then other women and men. Higher vitamin D concentration had more impact on decreasing depression risk in pregnant and postpartum mothers compared to other women and men. Among postpartum mothers, higher vitamin D concentration had a greater influence on decreasing breastfeeding mothers' depression risk than non-breastfeeding mothers.