Objective: Several studies have reported a high prevalence of hypovitaminosis D in orthopedic patients. The purpose of this prospective observational study was to report on the prevalence of hypovitaminosis D in patients scheduled for elective primary total knee arthroplasty (TKA) and its associated risk factors. Methods: In this monocentric cohort study, 25(OH) vitamin D serum levels were measured in 687 consecutive patients undergoing primary total knee arthroplasty (TKA) over a period of twelve months. Vitamin D levels were classified into deficiency (<20 ng/mL), insufficiency (20–29 ng/mL), and sufficiency (≥30 ng/mL). The study assessed the association of vitamin D levels with demographic and clinical factors, including age, sex, BMI, smoking status, and season of measurement. Statistical analyses included chi-square tests, correlation analyses, and multiple linear regression to identify significant predictors of vitamin D levels. Results: The cohort had a mean age of 67.70 ± 8.95 years and a mean BMI of 31.00 ± 5.71 kg/m2. Collectively, 33.9% of patients were vitamin D deficient, a further 32.9% were insufficient, and only 33.2% were sufficient. Vitamin D levels varied significantly with the season and were associated with obesity and smoking. Specifically, there was a small significant inverse correlation between BMI and vitamin D levels (r = −0.17, p < 0.01). Furthermore, regular nicotine abuse was linked to lower vitamin D levels (r = 0.14, p < 0.01). Multiple linear regression analysis reveals that age, BMI, nicotine abuse, and season were small significant predictors of preoperative vitamin D levels (R2 = 0.15, adjusted R2 = 0.12). A total of 121 (17.61%) patients reported routine vitamin D intake prior to surgery. Supplementing patients had a significantly higher mean serum vitamin D level and a significant reduction in the mean length of in-hospital stay (p < 0.01). Conclusions: The prevalence of vitamin D insufficiency and deficiency in patients undergoing elective primary TKA is alarmingly high. In ongoing efforts to optimize the efficacy and outcome of the TKA procedure, orthopedic surgeons should be advised to strongly implement the role of perioperative vitamin D levels in their routine practice.