Ureteral stents are indicated during gynecological surgeries that may risk damaging the ureters, such as hysterectomy or extensive pelvic surgeries. They are also used postoperatively to ensure ureteral patency, especially when there is a risk of fibrosis or external compression.