What can cause sudden irregular and heavy periods?

A # of things. Quite a few things can do it -- certain birth control methods such as Depo-Provera provera (medroxyprogesterone). Anovulation (absence of ovulation) with resultant breakthrough heavy bleeding is by far the most common cause of irregular heavy bleeding. Talking to primary care physician or obgyn would be necessary to determine the exact cause.
See a doctor. If your periods are too painful/heavy, see a GYN and get an US to detect problems like cervical lesions, infections, polyps, or fibroids. If you don't have any of these, you may benefit from hormonal control using contraceptives like the pill/patch/ring. The best option is a hormonal IUD (Mirena), that thins the lining and decreases your flow significantly. Some women even stop having periods!