Stones form due to many reasons common causes of the stone formation are:
Supersaturation of urine by decreases intakes of water and or hot environmental condition where there is loss of body fluid in atmosphere by perspiration, and in breathing.
Urine infection where crystals deposit themselves on and around the infection causing organism, and the stone grows over the period in the supersaturated urine.
Diet rich in oxalates, Uric acid, can increase the incidence of stone formation.
Functional or structural obstruction of the urinary system can precipitate the stone formation. Like Pelviureteric junction obstruction, Ectopic kidney, Horseshoe kidney.