Researchers followed more than 100,000 adults for more than two decades.
They found that men who got the recommended amount of Vitamin D were 16% less likely to develop heart problems or a stroke than those who didn't get enough.
There was no such pattern found among women.
The study was published in the American Journal of Clinical Nutrition.