the commonj red and brown ones arent harmful in the sense that they dont actually feed on anyhting in our tanks, llike corals and such, however as sammy stated they can grow to plague proportions. if you let them grow to plague proportions and then for some reason they have a mass die off or you treat the tank with someting to kill them and they all die, they release a nasty toxin, that in little amounts doesnt hurt, but if a mass die of occured...can wipe out all of your fish, possibly some corals. The owner of another lfs i used to work at had them in his home tank, and we found a treatment for them in the marine atlas vol. 1 by helmut debelius that is an actual flatworm treatemnt for horses, but when used in small quantities in reef tanks, destroyes the populations immediately. Anyway, he treated his tank with this stuff, and as soon as it hit the water his tank turned yellow from all of these flatworms dying at once. the toxins they released killed all of his fish, and a couple of corals, but the medication did what it was supposed to do, he just didnt think he ahd that many worms!
anyhow, the best method of removal, IME has always been a sixline wrasse, or an arrow crab. in times where i have seen a few in the tank, these guys readily chowed them up!
good luck
jon