The developing immune system and central nervous system in the fetus and child are extremely sensitive to both exogenous and endogenous signals. Early immune system programming, leading to changes that can persist over the life course, has been suggested, and other evidence suggests that immune dysregulation in the early developing brain may play a role in neurodevelopmental disorders such as autism spectrum disorder and schizophrenia. The timing of immune dysregulation with respect to gestational age and neurologic development of the fetus may shape the elicited response. This creates a possible sensitive window of programming or vulnerability. This review will explore the effects of maternal prenatal and infant nutritional status (from conception until early childhood) as well as maternal prenatal stress and anxiety on early programming of immune function, and how this might influence neurodevelopment. We will describe fetal immune system development and maternal-fetal immune interactions to provide a better context for understanding the influence of nutrition and stress on the immune system. Finally, we will discuss the implications for prevention of neurodevelopmental disorders, with a focus on nutrition. Although certain micronutrient supplements have shown to both reduce the risk of neurodevelopmental disorders and enhance fetal immune development, we do not know whether their impact on immune development contributes to the preventive effect on neurodevelopmental disorders. Future studies are needed to elucidate this relationship, which may contribute to a better understanding of preventative mechanisms. Integrating studies of neurodevelopmental disorders and prenatal exposures with the simultaneous evaluation of neural and immune systems will shed light on mechanisms that underlie individual vulnerability or resilience to neurodevelopmental disorders and ultimately contribute to the development of primary preventions and early interventions.