They can be detrimental to seedlings and young clones (if severe enough). For more mature plants they are generally just a nuisance.
Starving your plants of water is likely to do more harm than good, while perhaps affecting the fungus gnats marginally. Plants need moisture too, though; there should always be some level of moisture in your soil/mix. I'm not even sure how anyone could even water properly if they are always letting their potting mix get bone dry before they do water. It's fairly well established that potting mix\soil materials tend to exhibit hydrophobia upon drying out, meaning it will actually repel water at first.
Ever do or witness this experiment as a kid? You take a moist sponge, and a dry sponge and submerge each in a separate bowl of water for a bit to allow them to absorb as much as they can. Then you wring both out in separate receptacles to measure and compare the volume of water absorbed by each. Low and behold, the moist sponge absorbs more water than the dry sponge (keywords: cohesion, adhesion).
Same idea with soil\potting mix; existing moisture facilitates watering and allows the mix to hold more water.
Then of course a potting soil/mix has/should have decent organic matter content: sphagnum, coir even by themselves, earthworm castings, compost, humus, etc. It's all decaying organic matter, and that is primarily what fungus gnat larvae and pupae eat!
These are the stages of the fungus gnat life cycle (which takes about 3 or 4 weeks): eggs--> larvae--> pupae--> adults. Adults do not eat very much and only live for about a week. You really want to go after the eggs, or the larval\pupal stages as well as the flying adults. Bti/Mosquito Dunks do this very well, and it is narrow-spectrum, generally non-toxic to people and pets (still shouldn't be ingested).