Yes, diluted soapy water can be used to deter fruitworms. Dissolve a small amount of liquid soap in warm water in a spray bottle. Spray the affected foliage to discourage fruitworms from eating tomato fruits.