Soil-transmitted helminths (STHs) persist as a significant global public health issue among neglected tropical diseases (NTDs), particularly in children. STH infection can induce immune responses that affect the course of the disease; if treatment fails, chronic infection can lead to stunting, especially among children aged 24–59 months, which is a vulnerable period for growth and development. We conducted a correlational, cross-sectional data collection study to evaluate the characteristics and association of 25(OH)D, interleukin-5 (IL-5), and interleukin-13 (IL-13) with the prevalence of STH infection in children aged 24–59 months in Bandung District, Indonesia, in October 2019–January 2023. We recruited 694 subjects (401 stunted and 293 normal-height children). The prevalence of STH infection among the stunted and normal-height groups was 5.7% (95% CI: 3.85–8.46%) and 3.4% (95% CI; 1.86–6.17%) (p = 0.156), respectively. The probability of the prevalence of STH infection in children with levels of 25(OH)D, IL-5, and IL-13 below the cut-off point was 6,93 to 16.71 times higher. We found a relationship between IL-5, IL-13, and environmental factors and the prevalence of STH infection in stunted children.