Every once in awhile I get an e-mail with a question about the "small, black bugs that seem to be coming out of the drains in the bathroom and kitchen". These are called drain flies (see photo) and are common and usually no reason for concern but it may mean it is time to clean out the "gunk" in your drains!
Drain flies, also called moth flies (another image of drain fly) are small (~1/10") hairy flies that are commonly found in kitchens and bathrooms. Larvae of drain flies can develop in the organic, gelatinous material that builds up inside pipes and hence can be very common around sinks. They are also common outdoors near sewage plants and waste ponds. Adult drain flies are covered with scales that makes the fly look like a tiny moth. Flies may be attracted to lights and windows. Eggs are laid on the gelatinous film that forms in pipes or in sewage treatment facilities. Larvae develop in this rich organic material.
The drain flies are harmless but a close relative, the sand flies, actually transmit a serious disease called leishmaniasis. Leishmaniasis does not occur in the US.
Fly numbers can be reduced by removing the organic, gelatinous material that forms inside drain pipes. You can use a stiff brush or one of the relatively new bacterial/enzyme-type drain cleaners. Regular use of a drain cleaner will remove the layer of gunk and prevent fly development. There's no reason to use insecticides. Foaming-type chemical drain cleaners will work as well.
Don't use the bacterial/enzyme-type drain cleaners on clogged drains. For drains that are clogged you'll need a chemical drain cleaner or plumber's snake (or a plumber). The bacterial/enzyme cleaners are only intended to remove the organic film (gunk) that forms on the walls of drain pipes and such.