The common causes of death in chronic kidney disease (CKD) patients are cardiovascular events and infectious disease. These patients are also predisposed to the development of vitamin D deficiency, which leads to an increased risk of immune dysfunction. Many extra-renal cells possess the capability to produce local active 1,25(OH)2D in an intracrine or paracrine fashion, even without kidney function. Vitamin D affects both the innate and adaptive immune systems. In innate immunity, vitamin D promotes production of cathelicidin and β-defensin 2 and enhances the capacity for autophagy via toll-like receptor activation as well as affects complement concentrations. In adaptive immunity, vitamin D suppresses the maturation of dendritic cells and weakens antigen presentation. Vitamin D also increases T helper (Th) 2 cytokine production and the efficiency of Treg lymphocytes but suppresses the secretion of Th1 and Th17 cytokines. In addition, vitamin D can decrease autoimmune disease activity. Vitamin D has been shown to play an important role in maintaining normal immune function and crosstalk between the innate and adaptive immune systems. Vitamin D deficiency may also contribute to deterioration of immune function and infectious disorders in CKD patients. However, it needs more evidence to support the requirements for vitamin D supplementation.