ObjectiveThe research intended to probe the connection between the risk of stroke and serum vitamin D levels.MethodsThree electronic databases (Cochrane Library, EMBASE, PubMed) were searched according to the subject terms from inception until July 29, 2022, and retrieved researches were screened on the basis of inclusion and exclusion criteria. Two investigators conducted the quality assessment and data extraction. Using Stata 16.0 software, a meta‐analysis was conducted on the extracted data.FindingsIn total, 27 studies with 45,302 participants were included. Among these studies, 20 focused on stroke risk, while 7 examined stroke prognosis. According to the meta‐analysis findings, it was observed that a higher stroke risk is connected to reduced levels of serum vitamin D. This association was reflected in a combined relative risk (RR) of 1 .28 (95% confidence interval (CI): 1.15–1.42) and a worse prognosis after stroke (RR = 2.95, 95% CI: 1.90–4.60). Additional analysis indicated that no apparent relationship between a decrease in vitamin D and the probability of experiencing a hemorrhagic stroke was found. The RR found was 1.93 (95% CI: 0.95–3.95). On the other hand, it was observed that a reduction in serum vitamin D levels was linked to an elevated likelihood of developing an ischemic stroke. The RR identified was 1.72 (95% CI: 1.78–2.03). Moreover, a lower level of vitamin D in the bloodstream was associated with a more unfavorable prognosis for individuals who suffered from a stroke. The RR for this correlation was 2.95 (95% CI: 1.90–4.60). However, further research is required to confirm the above‐mentioned findings.ConclusionIn conclusion, lower concentration vitamin D was found to be related to an increased risk of stroke, which could mainly be reflected in ischemic stroke patients but not in patients with hemorrhagic stroke. A lower serum vitamin D level was correlative with the poor prognosis of stroke.