Planting marigolds in your veggie garden can help repel pests. The smell from this flower in particular seems to mask the scent of the vegetables, keeping pests them from nibbling at your goods. This is a great, safe, natural way to keep your garden whole and organic.
Source: My wise gardener mother :)
This page contains the following solutions.
Now that I have chickens, I am going to plant tons of marigolds all in the garden and around the house. Marigolds are one flower that make snakes wander elsewhere. This flower is going to be the star of my garden.
Garden pests, especially aphids can't stand to be around marigolds, so I plant them around everything, especially carrots and strawberries. Marigolds spread so nicely on their own.
To keep Mayflies from zooming around your head and biting you, put a couple of marigolds in your hat. They don't like the smell. They will circle your head and leave.
Marigold flowers have many effective natural pesticides that can be beneficial around your garden. This is a page about using marigolds to control bugs on your tomato plants.