When it comes to deterring garden damaging insects, we can employ chemical agents, we can employ companion plants, or we can invite predatory critters. By chemical agents, I do not mean just the commercially produced poisons (which I avoid) but things like Neem oil and pepper spray made from my jalapeno and cayenne cast-offs.
This year I companion planted borage with my tomatoes. That worked exceptionally well. My only mistake was in planting them at the same time: I should have given the tomatoes a month's head start. By the time the tomatoes were bearing ripe fruit, the borage was dieing off. Shortly after it was gone, the hornworms started appearing. But I still had help.
When I find a hornworm that is covered by white cases, I either leave it be or move it to a sacrificial tomato plant so the pupae it carries will mature and hatch. These are pupae cases of the Brachonid Wasp: a small, non-stinging, parasitic wasp that favors hornworms as the preferred meal for its young. The female Brachonid deposits its eggs just under the skin of the hornworm. When they hatch the larvae chew their way out (feeding on the worm as they go) and spin those white pupae cases. By the time you see those, especially if there are lots of them, the hornworm is in a weakened state. Many that I find in this condition will do little more damage, some never move from that spot.
By allowing the pupae to complete their life cycle you are bolstering a population of these small, harmless wasps that will in turn help you keep your garden free of hornworms.
Another welcome guest is the praying mantis. This year I've found at least two, maybe three manti patrolling my garden. One was small and bright green, two are brown and green and 4 to 5 inches long. The green one may have turned brown as it grew, I'm not sure. One worked valiantly to keep my cucumber vine free of stink bugs. The other stationed itself in my green bean box and fed on the bean beetles. Eventually the beetles out-bred the mantis and over-ran the bean plants. I didn't want to use a chemical agent on them for fear of repelling the mantis. I'd much rather it feed well, breed and increase it's numbers next year. I've gotten plenty of beans off those plants already. But when I pull them out, I'll have to be especially careful to not crush the mantis in the process.
Normally we have a good population of lady beetles that help to keep the bad bugs in check. They were conspicuously absent this year.
Another form of helper is the toad. I have found several living in my garden boxes. I found one especially fat fellow living under my zucchini plants. When I pulled them out he accused me of stealing his bug ranch, so I gently moved him to the sweet potatoes. Sorry, pal.
And of course there are spiders. All spiders are creepy, but many are (mostly) harmless to humans and can be beneficial for their predatory services. Any spider can bite if sufficiently provoked, and even the least venomous can cause discomfort – more if you happen to be allergic. It's a good idea to get and use a good spider ID chart so you know which ones to eliminate and which to leave alone.
Black ground beetles are also helpful in ridding our garden of unwanted pests. They hide under loose debris, like straw or leaf mulch, or under wood or rocks. They hunt mostly at night and eat a variety of insects, slugs, and snails. If you turn these up in your gardening, let them scuttle on to some other hiding place; they're here to help.
We need to overcome the knee-jerk “kill it, kill it!” reaction to finding “bugs” in our garden. Many of them are helpful. Knowing which are good guys and which are bad guys will help you maintain a healthy ecosystem in your garden.