For survival, a well-functioning immune system is critical. The immune system must be constantly alert, monitoring for signs of invasion or danger and make backup for response. To distinguish self from non-self and furthermore discriminate between non-self-molecules which are harmful (e.g., those from pathogens) and innocuous non-self-molecules (e.g., from food) cells of immune system play a important role altogether. In this article of Nutrients explores the relationship between diet and nutrients and immune function. Here, we outline the key functions of the immune system, and how it interacts with nutrients across the life course, highlighting the work included within the body. This includes the role of macronutrients, micronutrients, and the gut microbiome in mediating immunological effects. Nutritional modulation of the immune system has applications within the clinical setting, but can also have a role in healthy populations, acting to reduce or delay the onset of immune-mediated chronic diseases. Upcoming research in this field will ultimately lead to a better understanding of the role of diet and nutrients in immune function and will facilitate the use of bespoke nutrition to improve human health.