The exact cause of ulcerative colitis is unknown, but it is believed to involve a combination of genetic factors, an overactive immune system response, and environmental triggers. Stress and certain medications may also contribute to flare-ups.