Background: Urolithiasis is the most prevalent uronephrologic disorder caused by genetic, environmental factors, and metabolic defects. Objectives: The present study aimed to find a possible association between the vitamin D receptor (VDR) TaqI and the BsmI gene polymorphisms in relation to the serum levels of calcium (Ca) and vitamin D and the risk of urolithiasis. Methods: This case-control study was conducted on 68 children with urolithiasis and 67 healthy controls for the VDR gene polymorphisms using the polymerase chain reaction-restriction length polymorphism method. Results: The frequency of TaqI C allele was 36% in patients compared to 32.1% in controls (P = 0.49). A significantly higher frequency of the TaqI CC genotype was found among patients in the age group > 5 to 10 years. No significant difference was detected in the frequency of the BsmI A allele between patients (41.9%) and controls (42.5%, P = 0.91). However, a significantly lower frequency of the BsmI AA genotype was detected compared to those patients with Ca levels of > 10.8 mg/dL among patients with Ca levels of ≤ 10.8 mg/dL. Conclusions: Based on the results, a lack of an association between the VDR TaqI and BsmI polymorphisms with the risk of urolithiasis among children from Western Iran. However, a higher frequency of the TaqI CC genotype was found in the age group > 5 to 10 years. In addition, lower levels of Ca in patients were related to a significantly lower frequency of the BsmI AA genotype. The VDR gene BsmI polymorphism might affect the calcium level and the calcium metabolism in urolithiasis.