Recently, the immune system has been identified as one of the possible main bridges which connect the gut–brain axis. This review aims to examine available evidence on the microbiota–immunity–cognitive relationship and its possible effects on human health early in life. This review was assembled by compiling and analyzing various literature and publications that document the gut microbiota–immune system–cognition interaction and its implications in the pediatric population. This review shows that the gut microbiota is a pivotal component of gut physiology, with its development being influenced by a variety of factors and, in return, supports the development of overall health. Findings from current research focus on the complex relationship between the central nervous system, gut (along with gut microbiota), and immune cells, highlighting the importance of maintaining a balanced interaction among these systems for preserving homeostasis, and demonstrating the influence of gut microbes on neurogenesis, myelin formation, the potential for dysbiosis, and alterations in immune and cognitive functions. While limited, evidence shows how gut microbiota affects innate and adaptive immunity as well as cognition (through HPA axis, metabolites, vagal nerve, neurotransmitter, and myelination).