Our digestive health has a lot to do with our immune health and vice versa. Its role in maintaining our immune health and, eventually, our overall well-being cannot be underestimated. The two systems work closely to keep us in good physical shape.
Here, we’ll see how the two systems partner each other and what one does to keep the other system running.
A major Part of the Immune System is Located in the Digestive System
Around 70% of our immune system dwells in our digestive tract in the form of gut-associated lymphoid tissue (GALT). An important component of our immune system called plasma cells (which give rise to invader-defending antibodies) also reside within the GALT. Our gut is the major channel between the external environment and the internal systems of our body. It is exposed to plenty of germs and harmful invaders such as bacteria and viruses present in food particles on a daily basis.  These toxic agents are perceived by the immune system in the gut as being harmful to our body and attacked. That being said, our body does not reject everything we put into it. This process is known as tolerance. When our immune system rejects an otherwise harmless substance, we are labeled as being sensitive or allergic to that food/food ingredient.
Our Gut Microbiome Shapes Our Immune System
Our immune system, which is designed to control microbes, is, in essence, also controlled by the microbes themselves. The “friendly” gut bacteria function exactly opposite to the harmful microbes that cause disease. These bacteria provide essential nutrients, defend against pathogens, breakdown indigestible substances, and even contribute to the development of the gut structure. 
An additional factor emphasizing the importance of these beneficial microbes in actively shaping our immune system is their absence leading to disease. An imbalance in the composition of the microbiome (called as dysbiosis) upsets the relationship between the gut microbiome and our immune system. This alters the immune responses, which in turn, triggers several inflammatory disorders such as inflammatory bowel disease (IBD). 
It is also noteworthy that with IBD, your immune system fails to recognize and differentiate between self and non-self (invading) agents such that it begins attacking self (your own body tissues). So, with the gut microbiome getting off-balance, your immune system may also not be able to hold up well.
Components of the Immune System Interact with and modify our Digestive Health
Regulatory T cells (Tregs)
Just like the gut microbiome functions to shape our immune system, the latter also tends to modify the former. This is exemplified by an important aspect of our immune system called Tregs. These cells counter-balance the inflammatory responses. If for any reason, the Tregs stop functioning, it causes a breach in the intestinal immune responses, resulting in diseases like leaky gut, IBS, and IBD. In fact, the role of Treg cell defect in triggering IBD has been vastly documented so much so that these cells represent a promising approach for treating IBD. 
Toll-Like Receptors (TLRs)
Other crucial components of our immune system called TLRs are present on the intestinal cells as well as immune cells. They serve to identify and guard against the invaders in their “crosstalk with the microbiota.” 
As soon as the gut bacteria come into contact with the gut lining, TLRs are activated and stimulate the production of antibodies to limit the gut bacteria from over colonizing the gut. This, subsequently, protects us from inflammation. Aberrant TLR signaling, thus, forms the basis of conditions like inflammation of the colon and even cancer. 
This further elucidates the partnership of the digestive system with the immune system.
- Vighi G, Marcucci F, Sensi L, Di Cara G, Frati F. Allergy and the gastrointestinal system. Clinical and Experimental Immunology. 2008;153(Suppl 1):3-6. doi:10.1111/j.1365-2249.2008.03713.x.
- Round JL, Mazmanian SK. The gut microbiome shapes intestinal immune responses during health and disease. Nature reviews Immunology. 2009;9(5):313-323. doi:10.1038/nri2515.
- Lord JD. Promises and paradoxes of regulatory T cells in inflammatory bowel disease. World Journal of Gastroenterology : WJG. 2015;21(40):11236-11245. doi:10.3748/wjg.v21.i40.11236.
- De Kivit S, Tobin MC, Forsyth CB, Keshavarzian A, Landay AL. Regulation of Intestinal Immune Responses through TLR Activation: Implications for Pro- and Prebiotics. Frontiers in Immunology. 2014;5:60. doi:10.3389/fimmu.2014.00060.
- Cario E. Toll-like receptors in inflammatory bowel diseases: A decade later. Inflammatory Bowel Diseases. 2010;16(9):1583-1597. doi:10.1002/ibd.21282.