Tomato worms come from eggs that are laid by moths, in this case. These moths lay eggs on or near tomato plants, and then they hatch and grow into the dreaded tomato hornworm. The best way to prevent these pests is through certified organic pest control.