The ideal pesticide would be the one with an extremely narrow spectrum, acting on only one enemy and nothing else. Thus, the impact on the environment would be minimal: a single insect, disease or plant would be eliminated without negatively affecting anything nearby.
Right now, though, most pesticides on the market are quite the opposite: they are broad spectrum products. This includes insecticides that kill all insects, even ladybugs and bees; herbicides that eliminate all broadleaved plants including the lilies and foxgloves in your flowerbed; and fungicides that attack pretty much any fungus, even the ones needed to decompose plant debris and dead leaves.
However, there have been some interesting breakthroughs into more specific compounds that affect only a limited range of pests. Think of the highly popular Btk (Bacillus thurigiensis kurstaki), which only kills caterpillars (moth and butterfly larvae) and nothing else, and of beneficial nematodes (Steinernema, Heterorhabditis and others) that only infect grubs, maggots and other insect larvae that chew on plant roots underground.
A lot of very promising research is being carried out in this area. One day, we’ll probably be able to obtain an organic pesticide that only acts on goutweed (Aegopodium podagraria) or red spider mites and absolutely nothing else. That will certainly make gardening easier while reducing any negative environmental effects.
In the meantime, however, apply any pesticide, even an organic one, with precaution, as there is always risk of collateral damage.