As a graduate student in nutrition, I feel compelled to share with you all that fruits and vegetables and other food in its natural state provides you with the best nutrition. I am by no means an expert on how nutrients effect immunity, but I do have some broad knowledge in this area.
Eat a variety of fruits and vegetables: You've heard it before. Still, as more scientific studies are conducted, increasingly, researchers are finding that fruits and vegetables offer us great benefits. They provide us with plenty of vitamins and minerals (important to keep it varied as different fruits and vegetables are better sources of different vitamins and minerals). And, they are in an easy to absorb form for our bodies.
Supplements are OK: Supplements provide us with a quick and easy way to get our daily vitamins and minerals. Still, they are more expensive than the good old, fruits and veggies and they are not absorbed as efficiently by our bodies. Next, a lot of supplements provide you with 100% of your daily vitamin and mineral needs - if you meet 100% of your body's vitamin needs, you will either pee out the rest or store it in excess (depends on whether the vitamin is water or fat soluble/dissolvable), both of these which may have associated negative side effects.
Energy/calories: Your body requires a certain amount of calories for its basic functioning. When your immune system is compromised or "challenged," it requires extra calories and nutrients to function well. This is not to say that eating in excess boosts your immune system; to the contrary, studies note that a low calorie diet in which individuls still get their necessary vitamins and minerals, the immune response is boosted.
Protein: The most common cause of immunosuppression worldwide is protein (Ritz and Gardner, 2006 from The Journal of Nutrition). The proteins that we eat are broken down and then built into components of our immune cells/ cells that mediate the immune response. This means that not getting enough protein will result in fewer immune cells and also less effective functioning of immune cells - think about it - do you perform at your best when you feel starved?
Specific nutrients that contribute to immunity: vitamin E, vitamin C, vitamin A, Zinc, vitamin B6, folic acid, and pyridoxine (Chandra and Kumari, 1994 from the Journal of Nutrition) and others that are being discovered and investigated. In general, meeting recommended levels of vitamins and minerals will boost you immune response: each specific nutrient has a particular influence on immunity. For example, vitamins E, C, and A are known for their antioxidative effects that protect your immune (and other) cells from being damaged. Getting sufficient amounts of your vitamins and minerals is important to immunity, but getting any of them in excess will not improve your immune response.
I hope that this makes sense and is helpful in some way to you. Please let me know if you have any questions or concerns.
The deepest thing in our nature is this region of the heart in which we dwell alone with our willingnesses and our unwillingnesses, our faiths and our fears. -- William James