It is not clear where you have the pain. Is it on your right hip, thigh, flank, or abdomen? Or, is the pain right over the ovaries in the pelvis? Does it happen with every orgasm? Or, does it only occur once in a while? For example, does this pain only come once a month, during your menstrual period, or during your mid-cycle? Based on such very limited information, I am not sure what the source of your pain is and how it actually relates to your having an orgasm. Pain in a pelvic area could be due to many causes including from endometriosis
to pelvic inflammatory disease (or PID) to Mittelscherz, etc. A woman with an ovarian cyst can have a lot of pain and discomfort on the affected side. On the other hand, pain can and sometimes does exist for some unknown reasons that some women experience during orgasms. It is actually fairly common in otherwise healthy individuals. It has been suggested that the process of an orgasm activates a lot of neural sensory circuit in this very small area, where the clitoris creates a transient state of hypersensitivity. It is as if the nerves momentarily enter a state of buzz or high frequency firing. This is subsequently interpreted or misinterpreted as discomfort or pain. Otherwise, you can see that there are many reasons that could cause you pain that I would suggest a visit with an OBGYN who can further evaluate you to establish an exact diagnosis.