I'm guessing they are nothing more than planeria which are free swimming parasites that get into a tank on plants etc. They don't cause any harm to your fish so I shouldn't worry. They thrive very well when overfeeding continues. To be quite honest, nobody has come up with a sure fire way of eradicating them. The problem with using substances is to got to be careful that you don't harm your fish or biological filtration.
I would suggest removing the worms by hand, cut down on the feeding considerably and see how things go. As for algae, this can indeed be brought on by leaving the lights on for too long, locating a tank near a bright window and also high nitrate levels.