Basically, Vitamin D regulates the immune system as I understand it. It basically keeps it in tune and more responsive to beginning infections. So basically it increases recognition of a pathogen and jumps on it faster if you have a good level of vitamin D in your system. If you don’t, then the immune system is slower to react and doesn’t react as well allowing the pathogen to multiply freely as the immune system slowly gets around to fighting the disease.