Do some research on companion plants. These are plants that work together to deter pests. Herbs are almost always good anti-pest plants. tomatoes and basil work together to fight off each others pest. The Tomato Horn Worm, for example, does not like the chemicals that the Basil plants put off. There are a great many plants that work as companions. Marigolds and Colengula are two plants that work by themselves.
Of course, it's important that the plants you use to keep pests away don't also keep you away, but onions and garlics work wonders on some of the bigger pests, like squirrels and vampires. (OK, I'm just kidding about the vampire part. Vampires aren't usually particularly pestiferous in the garden anyway.) If deer are a problem, try oleanders. They can't eat them, and they make a decent hedge. Carrots love tomatoes, and protect each other from insect pests, and dill is a good companion plant because butterflies love to lay their eggs on it--but only as it is going by, anyway.