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.