Background Since beginning of Coronavirus disease of 2019 (COVID-19) pandemic, there were contradictions and speculations around vitamin D and COVID-19 relationship. Given that there is association between vitamin D deficiency and some diseases including cancer, autoimmune disease and some infectious diseases, COVID-19 higher incidence rate and mortality in vitamin D deficient population was not a surprise. Conversely, some research would argue this relationship. Considering these contradictions, the aim of this study was to determine the relationship between prognosis and vitamin D level in cases with COVID-19. Methods In this cross-sectional study, 329 confirmed cases of COVID-19 which admitted to Kamkar-ArabNia Hospital in Qom city, Iran from March to July 2020 were categorized into three groups according to vitamin D serum levels (ng/ml): sufficient (>30), insufficient (20-30) and deficient (<20). Prognosis was determined across the groups. Results There was significant difference in hospital stay between patients with sufficient and insufficient vitamin D levels (P = 0.007). Adjusting vitamin D levels for confounding variables, linear regression underscored significant differences in the association between length of hospitalization and lower vitamin D levels, with a longer stay noted in insufficient groups (P = 0.002). However, there was no significant difference in the time interval to return to normal oxygen level (from SpO2 below 93%) or death rate between groups (P > 0.05). Conclusion There is significant association between hospital stay and lower serum vitamin D levels. However, the relationship between vitamin D status and death rate or the time interval to return to normal oxygen levels is not significant.