I had braces for a few years and when I got them off my gums have been swollen and bleed every now and again randomly. Any idea what it is?

Gum disease. Unless braces/teeth/gums kept scrupulously clean during Ortho Rx, gums can be harmed. Bleeding usually indicates infected gums. Please see your General Dentist. Referral to a Periodontist may be in order.
Bleeding gums . When was the last time you had your teeth cleaned. Now that your braces are off it is a good time to see your dentist and have your teeth cleaned. You may have some tarter or cement build up under your gums. Meanwhile keep in brushing and. Flossing.
Inflammation. Bleeding gums are indicative of inflammation. Flossing and brushing correctly? Dental hygiene appt? You may have calculus caught in certain areas.
Brushing? I have seen this in the past when persons do not brush properly or adequately with braces on. The gum becomes boggy and bleeds easily. On occasion they become inflamed gingivitis. Best to use a good mouthwash or even brush with a bicarbonate (sodium bicarbonate) mix. It should resolve once the gums return to normal but maintain good oral hygiene.