For a long time, we've known that chemical pesticides aren't the best option for pest control in the garden. For example, did you know that you can't dump pesticides along with your regular trash, nor can you flush it down the toilet for the risk of killing beneficial organisms involved in the waste breakdown? If it isn't safe enough to go with the trash, how safe is it for use on things you intend to consume later?
In addition, secondary harm to unintended targets (like birds who eat from your garden can have far-reaching consequences (remember DDT?). Therefore, finding more eco-friendly ways to solve your bug problem should be at the top of your list when thinking about pest control. To start you off, here are a few ideas.
1. Repellents and barriers
As the name suggests, using barriers and repellents keeps bugs from getting into your garden. Barriers to gardening can take many shapes; for instance, plant carrots inside toilet paper rolls to keep away cutworms. Another idea is to spread lime around your garden to keep away snails or cayenne pepper for ants or iron phosphate (a readily available product used as a nutritional supplement) for slugs.
You can also grow certain plants that are natural insect repellents around the garden perimeter, e.g., pennyroyal, peppermint, and spearmint to control ants and aphids. Boil cedar twigs and cool the water then use it to water your plants to keep way underground pests like corn earworms and cutworms.
2. Beneficial insects
Just like you have good bacteria in your body, not all insects on your farm are the enemy. Green lacewings, praying mantis and ladybirds are examples of "good bugs" as they feed on the smaller problematic garden pests. You can lure them into your garden by creating a good environment for them. Research on what beneficial insects work well for the pests you're fighting. Over the longer term, beneficial insects can be even more effective than chemicals that have to be reapplied after some time or when you plant a new crop.
3. Biological agents
There are some naturally-occurring bacteria that release toxins harmful to insects but non-toxic to humans. These do not create the chemical resistance that chemical pesticides do (especially when used too much and easily break down in the environment without harming the food chain.
The best example is Bacillus thuringiensis bacteria which releases Bt toxin that works against caterpillars. There are different brand names containing this toxin as the active ingredient; talk to your local store for better guidelines. Another example is insecticide derived from Saccharopolyspora spinosa which kills medflies, caterpillars, leaf miners borers and fruit flies among others.