Nature is full of good insects like ladybugs, lacewings and bees. It's important to plant a variety of host plants for these good insects who come to feast on the bad insects (aphids, whiteflies, thrips.) You also need to plant perennials that attract pollinators: bees and hoverflies.
Avoid using pesticides. Many are broad spectrum and will kill the good insects along with the bad. If you wipe out the population of beneficial insects, you're left to fight the pests by yourself. Choose a safer alternative to pesticides, like Bt or spinosad.

Good plants to attract ladybugs and lacewings:
  • yarrow
  • dill
  • queen anne's lace
  • tansy
  • butterfly weed
  • coriander
Good plants to attract bees and hoverflies:
  • lavender
  • feverfew
  • poppy mallow
  • globe lily
  • cosmos
  • queen anne's lace
  • pennyroyal
  • statice
  • stonecrops
  • French marigold
  • sweet alyssum