COVID-19-pandemic-related home confinement aids in limiting the spread of the virus but restricts exposure to sunlight, thereby possibly affecting 25(OH)D concentrations. This study aimed to investigate the effect of lockdown measures on 25(OH)D levels in outpatients visiting the healthcare centre over a period of two years. In this retrospective chart review, outpatients who visited a university healthcare centre for a health check-up over a period of two years were included. The patients’ 25(OH)D serum levels and status were compared before, during, and after the lockdown periods. A total of 7234 patients were included in this study, with a mean age of 34.66 ± 16.78. The overall prevalence of 25(OH)D insufficiency, deficiency and sufficiency was 33.8%, 30.7% and 35.4%, respectively. The proportion of individuals with 25-(OH) D deficiency prior to lockdown was 29% and this proportion increased in the lockdown and post-lockdown periods to 31.1% and 32%, respectively. Although gender was less likely to have an impact on the 25 (OH) D level during the lockdown period (p = 0.630), we found an association between gender and 25 (OH) D status in the pre-lockdown and post-lockdown periods (p < 0.001 and p < 0.001, respectively). Another association between nationality and 25 (OH)D levels was found before, during and after the lockdown periods (p < 0.001). In addition, the youngest population, aged between 1 and 14, was strongly affected by the home confinement. Age had a positive and significant (p < 0.05) effect on 25 (OH) D status regardless of the different periods. Moreover, in the pre-lockdown period, male outpatients had 1.56 chance of having a sufficient level of 25 (OH)D. However, during the lockdown period, this chance decreased to 0.85 and then increased to 0.99 after the lockdown period. We found no statistically significant difference in the mean serum concentrations or in the prevalence of vitamin D insufficiency when we compared values from before, during and immediately after the COVID-19 lockdown period. However, there was a generally increased prevalence of vitamin D insufficiency in our study population. Another association between gender, nationality and age groups with 25(OH) D was found. Regular exposure to UVR is recommended for maintaining adequate vitamin D levels and to prevent vitamin D deficiency. Further research is needed to determine the best indications for vitamin D supplementation if confinement periods are extended and to consider the potential health consequences of prolonged confinement periods not only on vitamin D status but also on overall public health. The findings of this study may be considered by stakeholders for a targeted supplementation approach for risk groups.