as a hormone, vitamin d does many things in the body. it was first discovered as the substance which could prevent and cure rickets. it controls the levels of calcium ions and phosphates in the blood, as well as calcium and magnesium absorption in the intestines. it helps bones grow and form. it is also good for the immune system.