Yes, several full sun annuals repel pests and help protect your vegetable garden at the same time. Marigolds are the most famous example that gardeners have used for decades. These bright flowers put out scents that many insects find unpleasant.
I plant French marigolds around my tomato patch every single year now. The rows with marigolds next to them have far fewer aphids and whiteflies than bare rows. I noticed this pattern my second year of gardening and haven't stopped planting them since. The flowers add color while they work to protect my food crops.
Pest repelling flowers work in different ways depending on the plant you choose. Some give off strong scents that mask the smell of your vegetables from hungry bugs. Others release compounds into the soil that kill harmful pests underground. A few attract good bugs that eat the bad ones in your garden.
Research backs up some claims about marigolds repel insects but not all of them. Studies show French marigolds kill root-knot nematodes in the soil over time. These tiny worms damage tomato and pepper roots and are hard to control once you have them. Plant marigolds in the same spot for a full season to see real results.
The claim that marigolds keep all bugs away is garden folklore at best. They don't stop every pest in your yard. Deer will still eat your hostas and rabbits will still munch your lettuce. But marigolds do help with certain flying insects that avoid their strong smell.
Nasturtiums work as trap crops that lure pests away from your vegetables. Aphids love nasturtium leaves and will swarm them instead of your beans or squash. You sacrifice the nasturtiums to save your food crops from damage. I plant a ring of them around my bean tepee every spring for this reason.
Petunias have sticky hairs on their leaves that trap small insects like aphids and leafhoppers. The trapped bugs can't escape and die on the plant surface. This makes petunias a good border plant around vegetable beds in full sun spots. They look pretty while they catch pests for you.
Place your pest-deterring flowers close to the plants you want to protect. A marigold across the yard won't help your tomatoes much at all. Ring your vegetable beds with a single row of French marigolds 6-8 inches apart. Mix nasturtiums in among your beans and squash where aphids tend to strike first.
Read the full article: Full Sun Annuals That Thrive in Sunshine