I have raised this question a couple of times in this forum and have since done more research into the types of worms and if they are or are not beneficial. I have concluded that the best way to determine if the worms are good or bad is to get a book that identifies them.
The common answer on the subject of worms is that they do help your tank and shows sign that you have a well-established reef. A more in depth answer to individual worms, when identified, can allow you to know their characteristics, the most important and most concern to the home aquarist would probably be feeding.
For the most part, I have identified mostly beneficial worms in my tank. I can distinctly remember finding two that were notorious for catching and eating fish.
I have found that most answers on worms are somewhat right, but lack a lot of pertinent information that is needed. Again, get a book with good credentials.