In order for the body to function properly, it needs not only food, but also nutrients and non-nutritive bioactive compounds that have an immunomodulating effect. This applies not only to healthy people, but especially to people with accompanying chronic diseases, including type 2 diabetes. Unfortunately, the current food industry and the use of highly processed food promote nutritional deficiencies. Many studies confirm their occurrence in patients with type 2 diabetes. The article presents the influence of selected nutrients on the functioning of the immune system, which ensures homeostasis of the body, with particular emphasis on type 2 diabetes. The role of macroelements, microelements, vitamins and selected substances, such as omega-3 acids, coenzyme Q10 and alpha-lipoic acid. The minimum scope of tests that should be performed in patients to directly or indirectly determine the degree of malnutrition in this group of patients is presented.