X-rays in gynecology are primarily used for diagnostic purposes. They can help detect abnormalities in the uterus, fallopian tubes, and other parts of the reproductive system. One common procedure is the hysterosalpingogram (HSG), which evaluates the shape of the uterus and the patency of the fallopian tubes.