In my experience, the presence of indoor plant pests is very often a consequence of the infested plant being under some kind of cultural stress, such as improper light or watering. Stressed plants are definitely more susceptible to a pest problem.
I have had some plants that were not being cared for properly and had some pest problems. For a variety of reasons, I was not able to spray or otherwise treat the pests directly. However, after 6 months of proper care, the pests were gone. I am not suggesting that pest problems should go untreated, but I am suggesting that it is important to evaluate the cultural conditions of the plants whenever pests are found. It is quite possible to eradicate pests and lose the plant for other reasons.
Fungus gnats are often introduced when plants are repotted. Potting mixes that contain soil, compost, and bark chips are often sources of gnat larvae. As Baja has pointed out, letting the soil get as dry as possible is often the best remedy or gnat larvae. The presence of fungus gnats is often a sign of overwatering
Be sure to check any new plants that you introduce to your home. Being able to identify pest problems in their very earliest stages makes treatment much easier and more successful.
Finally, I would note that non-toxic remedies require direct contact with every last critter being treated. Spraying in the usual way often misses some of the nearly invisible juveniles and they will mature and reproduce. Whatever remedy you use, it is very important that all leaf and stem surfaces are sprayed to the point that they are dripping wet.
For scale and mealybugs, I use a mix of 20% alcohol and 80% water with a squirt of liquid dish soap. For spider mites, just soap. Folks who say they have tried these remedies and they don't work, it is because they were not 100% thorough. For really serious infections, if you are willing to use pesticides, imidacloprid is most effective.