Yes, vitamins play a crucial role in immune function. Vitamin A is essential for the maintenance of the integrity and function of mucosal cells, which are the body's first line of defense against pathogens. Vitamin D modulates the immune response by influencing the activity of immune cells like macrophages and T-cells. Deficiencies in these vitamins can lead to impaired immune responses and increased susceptibility to infections.