Many carnivorous plant growers consider adult fungus gnats a nuisance at worst and a source of food for their small plants at best. That may be true for the adults. But considering how easy it is to hand feed plants there is no excuse for encouraging the adults because where you find adults, usually larvae follow.
The larvae of fungus gnats are a hazard to your plants. They are an especially serious problem for small carnivorous plants. They damage and eat seedlings of most or all species typically grown in peat or coir as well as Pinguicula plants with leaves touching the soil surface. They may also damage and tunnel into plant stems. Fungus gnat larvae and shore fly larvae (shore flies can be a problem in greenhouses) have been shown to spread pathogenic root fungi. Root damage by the larvae may also aid in the infection of plants by pathogens. This isn't something you want growing with your plants.
It is possible to control fungus gnat larvae with pesticides. A number of chemical pesticides work but are best avoided unless you are commercial grower with special training, follow label instructions, and test some of the plants for toxicity before treating all of them. There is a relatively safe product called Gnatrolâ„¢ that is essentially the spores of Bacillus thuringiensis subsp. israelensis bacteria that can be used as a soil drench. But why endanger yourself and/or your plants or buy expensive treatments when it is so easy to change your growing conditions to ones that don't encourage fungus gnats.
The preferred substrate for fungus gnat larvae is wet, peaty soils with fungus and cyanobacteria (blue-green algae) growing on and in it. Of course, this is the preferred soil for many carnivores (without all the fungus and cyanobacteria). All you need to do to discourage adult fungus gnats from laying eggs is to put a 5 mm layer of medium to coarse-grained horticultural sand on the surface of the soil in your pots. Do not use straight "play sand" or "builders sand". They contain fine as well as course grains that defeat the purpose. If you sieve builders sand, only save the coarse particles, and wash it well, that should be OK. Washed 12 or 16 mesh sand blasting sand is the best because of the even grain sizes.
Pinguicula and Cephalotus actually seem to do better with a 5 to 10 mm layer of horticultural sand on the surface of the media. Most Drosera don't mind the sand layer if they are mature-size plants. Seedlings and leaf cuttings should be kept in plastic bags until they are large enough to handle the sand treatment. As a bonus, the sand layer can help reduce problems with mosses and other things that like growing in wet soil.
--John Brittnacher
Fungus gnat larvae on a 1mm grid. Note the black head capsule.
Fungus gnats on a Pinguicula leaf. The only good fungus gnat is a dead fungus gnat!
Fungus gnat larva damage on a small Pinguicula cyclosecta plant.