The deficiency of vitamin D is prevalent all over the world. Studies have shown that vitamin D may play an important role in the development of obesity. The current study was conducted to quantitatively evaluate the association between serum 25-(OH) vitamin D levels and the risk of obesity in both diabetic and non-diabetic subjects. A systematic review and meta-analysis of observational studies was carried out for that purpose. We searched the Medline, PubMed, and Embase databases throughout all of March 2018. A total of fifty five observational studies for both diabetic and non-diabetic subjects were finally included in the meta-analysis. The data were analyzed by comprehensive meta-analysis software version 3 and the random effects model was used to analyze the data. The meta-analysis showed an overall inverse relationship between serum vitamin D status and body mass index (BMI) in studies of both diabetic ( r = −0.173, 95% = −0.241 to −0.103, p = 0.000) and non-diabetic ( r = −0.152, 95% = −0.187 to −0.116, p = 0.000) subjects. The evidence of publication bias was not found in this meta-analysis. In conclusion, the deficiency of vitamin D is associated with an increased level of BMI in the studies of both diabetic and non-diabetic subjects. Reliable evidence from well-designed future randomized controlled trials is required to confirm the findings from observational studies and to find out the potential regulatory effects of vitamin D supplementation to lower BMI.