A large number of bugs can prey upon a flower garden, chewing on leaves, consuming flowers or weakening stems. These can pose a challenge to any garden. Some gardeners use pesticides and insecticides, but the most natural and healthy way to get rid of harmful bugs and pests is to grow plants that repel them. Ironically, many of these work by attracting yet more insects into the garden, but these insects (such as honeybees, ladybugs and lacewings) will kill and eat the bugs that would damage your garden without doing any damage themselves.
Marigolds work against harmful bugs in two ways: first, by repelling pests, and second, by attracting hover flies, which them prey upon the harmful bugs. Marigolds repel the Colorado potato beetle, the Mexican bean beetle, aphids and root nematodes. They can be used as a border or interspersed among the other plants.
Asters work best as border plants and produce colorful daisy-like flowers. They attract honeybees and ichneumonid wasps. The latter are parasitic insects that prey on many other kinds of bugs, including flies and beetles. Asters bloom in summer and fall and prefer full sun.
Yarrow plants also work best as a border. They produce clusters of many tiny flowers in various colors, including white, red, yellow or pink. Yarrow attracts hover flies, ladybugs and parasitic wasps. This plant is hardy in zones 3 through 8. It can be invasive, so inspect your garden regularly to prevent yarrow from spreading too much.
The cornflower produces beautiful blue flowers and works well as a border. It attracts beneficial insects by means of its very sugary nectar, stored in extrafloral nectaries (nectar glands outside the flower). Ladybugs, flower flies, lacewings and parasitic wasps are attracted to the constant supply of nectar, which continues even when the plant is not in bloom.
The perennial anise hyssop is also called Korean mint. It produces violet or purple spikes of flowers rich in nectar, which attract many beneficial insects. A side benefit of the plant is that it will attract butterflies, adding a little bit of extra color to the garden.
The golden marguerite perennial produces medium-sized bright yellow daisy-like flowers. It is among the most attractive plants for beneficial insects and will attract flower flies, lacewings, ladybugs, mini-wasps and tachinid wasps. It will do very well in poor soil.