Flowers and herbs that give off strong aromas also may help keep worms and chewing insects away from your harvest, and can be planted liberally throughout the garden. The most commonly used flower is the French marigold, such as the Safari Primrose, Sophia and Bonanza varieties. Not only do the flowers give off a strong scent, but the roots do as well. This may help drive away nematodes, which attack root crops. Marigolds are also relatively inexpensive and can be direct-seeded in the spring.
Basil set between tomato plants is said to ward off tomato hornworms.
I've found hornworms a few times when I've also planted basil nearby, but the worms have been few and infrequent. Be prepared to make a lot of pesto, however, as you'll have plenty of basil to work with by midsummer. Catnip may repel cabbage worms, aphids and flea beetles, the latter being the bane of eggplant growers in this climate. The downside of having catnip in your garden should be obvious. But if you garden in a catless neighborhood and choose to plant catnip, be sure to confine it in a container.