You can compost regular pond algae but NOT toxic blue/green algae.
Pond algae and the like, and seaweed, are a great source of nitrogen for compost heaps. Compost heaps need a good mix of fresh “greens” and drier, older “browns” to stay balanced and produce optimal compost so if you’re adding a lot of algae or other “greens”, make sure you balance it out with “browns” like dry leaves, cardboard or sawdust.
(Blue/green algae can contain hepatoxins and/or neurotoxins, depending on the species and is toxic to humans and animals, leading to serious illness and even death within days. For your safety and that of your pets and wildlife, you should dispose of it through other methods rather composting it.)
Also see: Pondweed