Animal models are useful preclinical tools for studying the pathogenesis of mental disorders and the effectiveness of their treatment. While it is not possible to mimic all symptoms occurring in humans, it is however possible to investigate the behavioral, physiological and neuroanatomical alterations relevant for these complex disorders in controlled conditions and in genetically homogeneous populations. Stressful and infection-related exposures represent the most employed environmental risk factors able to trigger or to unmask a psychopathological phenotype in animals. Indeed, when occurring during sensitive periods of brain maturation, including pre, postnatal life and adolescence, they can affect the offspring's neurodevelopmental trajectories, increasing the risk for mental disorders. Not all stressed or immune challenged animals, however, develop behavioral alterations and preclinical animal models can explain differences between vulnerable or resilient phenotypes. Our review focuses on different paradigms of stress (prenatal stress, maternal separation, social isolation and social defeat stress) and immune challenges (immune activation in pregnancy) and investigates the subsequent alterations in several biological and behavioral domains at different time points of animals' life. It also discusses the "double-hit" hypothesis where an initial early adverse event can prime the response to a second negative challenge. Interestingly, stress and infections early in life induce the activation of the hypothalamic-pituitary-adrenal (HPA) axis, alter the levels of neurotransmitters, neurotrophins and pro-inflammatory cytokines and affect the functions of microglia and oxidative stress. In conclusion, animal models allow shedding light on the pathophysiology of human mental illnesses and discovering novel molecular drug targets for personalized treatments.