Depending on the type of Flatworm, some will kill corals. The common Red Planaria will not harm your corals, until they reproduce to such a high level that they cover your corals, blocking light. However, when Red Planaria die, they become toxic to your tank. So, if you have a large population of them and they die, it can crash your entire system. Acropora eating flatworms will, as their name suggests, eat Acropora corals. There are also large flatworms that seem to have a mottled pattern to them. They are predatory towards snails and clams.
If you have Red Planaria, you can try a couple different things, before resorting to Salifert Flatworm Exit. Siphon out as many as you can and increase your flow. This may eliminate your problem. Some people have had great success with Leopard Wrasses, Corris Wrasses or 6 Lined Wrasses. The final step would be to use Salifert Flatworm Exit. If you use FWE, it's very important to remove as many of the flatworms as you can find, PRIOR to treatment. It's also important to collect as many dead from the tank as you can, immediately after treatment. FWE kills them very quickly and you'll see them floating around in the water column.
Here's a Google Image search for Red Planaria, to give you an idea of what they look like.
http://images.google.com/images?q=R...ent=firefox-a&um=1&ie=UTF-8&sa=N&hl=en&tab=wi