There's a few possible causes, your doctor can help clarify what it is. Just make sure the pain is from the joint and not something else in your lower abdomen (pancreas, galstones, kidney, or uteran cysts). As pains can radiate and be general in a region packed with lots of possible pain-causers.
When we flare, sometimes we get increased joint pains as a consequence. Those pains can ebb and flow along with the flare. Uc is an autoimmune inflammation response, and joints and other things can suddenly become targets when we're flaring and our immune system's out of control. As our immune system calms down overall, all targets benefit.
Sometimes autoimmune disorders come in 2's and 3's, especially after we've had uc for many years. Arthritis is a type of auto-immune attack that causes inflammation in the joints. Arthritis can happen at any age, and isn't just limited to older folks.
Ankylosing spondylitis is a common joint problem with uc patients, we have increased risk. It's at the joint of the hip and spine.
The ccfa has a good fact sheet on arthritis and ibd:
www.ccfa.org/assets/pdfs/arthritiscomplications.pdf