Eating a balanced and nutritious diet is essential for a strong immune system. Foods such as fruits, vegetables, whole grains, lean proteins, and healthy fats provide the vitamins, minerals, and nutrients necessary for a healthy immune system. Consuming a variety of nutrient-dense foods can help you achieve and maintain a healthy weight, which is also important for optimal immune function.