A 2020 study found that a vitamin D deficiency is associated with erectile dysfunction. Vitamin D is important for systems of the body such as the endocrine, immune, and circulatory systems.