Atrial fibrillation (AF) is a severe and most common supraventricular arrhythmia in humans, which, if left untreated or treated ineffectively, can lead to ischemic stroke or heart failure. It has been suggested that serum vitamin D (VitD) deficiency may be one of the critical factors influencing the onset of AF, especially in the period after cardiac surgery, such as coronary artery bypass grafting. Several papers have indicated that VitD supplementation reduces the risk of AF, significantly reducing the proportion of patients between the control and study groups in both the pre- and postoperative periods. Factors that increase the risk of AF from VitD deficiency are also further indicated, and these are age, gender, weight, season or comorbidities. In addition, the cardiodepressive mechanism of VitD is not fully understood; however, it is suggested that it acts through at least two pathways. The first indicates a direct effect of VitD on atrial muscle degradation, while the second is related to the modulation of cardiovascular depression factors. Despite many reports showing correlations between no VitD concentrations on the development of AF, this topic is still widely debated and the results from these papers are still subject to doubt. Therefore, this review aims at describing in detail the problem of correlation between VitD deficiency and the development of AF associated mainly with the postoperative period, i.e., after cardiac surgery, especially pathogenesis, and results of this correlation, taking into account recent studies, limitations and future perspectives. Due to the fact that this is still a topical problem, we believe that the collection of the latest reports and a detailed description of the problem is most appropriate in this case.