Vitamin D helps the body absorb calcium and maintain bone and muscle health.
The skin produces the vitamin naturally after exposure to sunlight.
People also absorb small amounts through foods like fortified milk.
The study in Washington DC compared vitamin D levels in people at a wide range of rates while taking whether they had diabetes into account.
The findings indicated that vitamin D was associated more closely with glucose metabolism than obesity.
The study suggested that vitamin D deficiency and obesity acted together to heighten the risk of diabetes and other metabolic disorders.
They concluded the average person might be able to reduce their risk with a healthy diet and getting enough outdoor activity.
The study is published in the Endocrine Society Journal of Clinical Endocrinology and Metabolism.