Nutrition profoundly shapes immunity and inflammation across the lifespan of mammals, from pre- and post-natal periods to later life. Emerging insights into diet-microbiota interactions indicate that nutrition has a dominant influence on the composition—and metabolic output—of the intestinal microbiota, which in turn has major consequences for host immunity and inflammation. Here, we discuss recent findings that support the concept that dietary effects on microbiota-derived metabolites potently alter immune responses in health and disease. We discuss how specific dietary components and metabolites can be either pro-inflammatory or anti-inflammatory in a context- and tissue-dependent manner during infection, chronic inflammation, and cancer. Together, these studies emphasize the influence of diet-microbiota crosstalk on immune regulation that will have a significant impact on precision nutrition approaches and therapeutic interventions for managing inflammation, infection, and cancer immunotherapy.