The primary causes of toxic megacolon include inflammatory bowel diseases like ulcerative colitis and Crohn's disease, as well as infections such as C. difficile colitis. Other causes may include ischemic colitis, volvulus, and certain medications that slow down bowel motility.