It is increasingly appreciated that perinatal events can set an organism on a life-long trajectory for either health or disease, resilience or risk. One early life variable that has proven critical for optimal development is the nutritional environment in which the organism develops. Extensive research has documented the effects of both undernutrition and overnutrition, with strong links evident for an increased risk for obesity and metabolic disorders, as well as adverse mental health outcomes. Recent work has highlighted a critical role of the immune system, in linking diet with long term health and behavioral outcomes. The present review will summarize the recent literature regarding the interactions of diet, immunity, and behavior.