If you have recently planted vegetables in your garden and have pest problems, there is an easy, natural solution for your pest-management regime: try companion plants. Certain flowers pair well with vegetables by acting as a deterrent to pests. Also, other flowers attract unwanted pests luring them closer so be sure to plant these flowers away from your crops for the desired effect.

Edible  Flower Name  Botanical Name  Comments
TomatoesStrawberry Marigold Tagetes spp. The fragrance and taste of marigolds help deter larger pest such as deer especially if planted in mass. They lure away slugs and snails that are attracted to strawberries, and ward off tomato worms, whiteflies, and nematodes from your tomatoes.
LettuceMelons

Squash

 Nasturtium Tropaeolum majus Many despise this plant because it is a magnet for aphids, but you can use this attribute to your advantage by planting it away from pest prone vegetables. Plant in containers or borders and your vegetables are left practically unscathed. Not only that, nasturtium also attracts beneficial insects and their larva to help control pest populations and aid in pollination. Did we forget to mention that nasturtiums leaves and flowers are edible?
General garden Sunflower Helianthus spp. Sunflowers benefit your whole garden, they attract birds and pollinators alike and now come in more colors than the traditional yellow. While some consider birds as pests for berry and fruit crops, they are also beneficiary pest controllers. They eat aphids, caterpillars, and underground larvae that can greatly devastate your crops.
BroccoliRoses Alyssum Lobularia spp. Alyssum flowers are available in an array of colors from lavenders, pinks, and purples which greatly attract pollinators. Ladybugs and syrohid flies hover over this plant and lay their larvae which in turn eats aphids. Planting alyssum next to plants and vegetables that are prone to aphid infestation will decrease pest and disease issues. If you love roses, this is a perfect companion plant for you!