Several conditions can necessitate a nephrostomy in children. These include ureteropelvic junction obstruction, severe hydronephrosis, or complications from kidney stones. The primary goal of the procedure is to relieve urinary obstruction, preserve kidney function, and prevent infections or damage to the kidneys.