Exiting from the largely sterile environment of the womb, the neonatal immune system is not fully mature, and thus neonatal immune cells must simultaneously mount responses against environmental stimuli while maturing. This dynamic process of immune maturation is driven by a variety of cell-intrinsic and extrinsic factors. Recent studies have focused on some of these factors and have shed light on the mechanisms by which they drive immune maturation. We review the interactions and consequences of immune maturation during the pre- and perinatal period. We discuss environmental signals in early life that are needed for healthy immune homeostasis, and highlight detrimental factors that can set an individual on a path towards disease. This early-life period of immune maturation could hold the key to strategies for setting individuals on trajectories towards health and reduced disease susceptibility.