Soapy water plus cayenne, sprayed on the plants, is the only DIY remedy I know of, but if you really want to get rid of tomato worms, use Bacillus thuringiensis... product name is Thuricide. It's a natural organic non-insecticide that causes worms' stomaches to rupture. Just mix it with water and spray it on the leaves every few days.