Water, water everywhere, and not a fly in sight! Well, not actually, because the vast majority of flies could be considered aquatics. I’m not just talking about those flies that actually are aquatic at some stage of their life (like chironomid midge larvae, or black fly larvae; I’ll discuss them later), but rather how even those considered “terrestrial” require extremely moist habitats. Take for example, larve of the Xylophagidae, which in North America live in the humidor of rotting bark on downed trees. Or fruit flies (both the true fruit flies {Tephritidae} and the household “Drosophila” melanogaster), which develop in live fruits, stems, flower heads, and leaves for the former, and rotting fruits in the latter. A decaying body is a wet place, and harbours plenty of maggots, usually of Calliphoridae. A live body is also a wet place, and can be colonized by a number of families (termed myiasis) including the infamous bot fly (Oestridae). In fact, very few flies come to mind that don’t spend at least a part of their life in a humid/moist/wet environment.
Besides the vast diversity of “aquatic” flies, flies that are truly aquatic as larvae have been found to be important bioindicators of the health of their watery homes. Phantom midges (Chaoboridae) and their larvae have been used to monitor heavy metals such as nickel in northern Ontario lakes. Black fly larval diversity and species composition has been used to evaluate the health of rivers, especially in northern Canada (imagine that field work, ouch).
Finally, there are some flies which defy convention and dive headlong into the water (skip to 4:40 to see the flies, taken from The Future is Wild series):