Some flowers help support vegetable gardens by repelling pests, some by attracting beneficial insects, some by providing protection when the crop is in its developmental stages, while others increase crop yields. This practice is known as companion planting and has been used by gardeners for hundreds of years. Take advantage of this phenomenon and add a few flowers to your vegetable garden. They'll provide some benefit to your vegetables and look good too.
Marigolds exude a chemical from their roots that repels nematodes, a garden pest that attacks the roots of plants and lives in the soil. They are especially beneficial to tomatoes, eggplant and peppers. Surround these plants with marigolds, but leave enough room between them and your vegetables so the vegetables have enough room to grow and thrive.
Sunflowers attract aphids, detracting them from eating your vegetables. The aphids cause very little damage to sunflowers, because their stalks and leaves are so tough. Another benefit of sunflowers is they attract hummingbirds, which in turn eat whiteflies. When planted near it, sunflowers are reputed to increase yields of corn.
Nasturtium deters aphids, squash bugs, cucumber beetles, whiteflies, and other pests that attack members of the squash family. Plant them as a barrier around those crops and also around tomatoes and cabbage. Fruit growers often plant nasturtiums in the root zone of their fruit trees. The trees take on nasturtiums' pungent odor, which then repels bugs and pests that often attack them. Interestingly, this has no effect on the taste of the fruit.