Actually, five flies in the garden. These five flies (Order Diptera, “two wings”) are often encountered in gardens and other leafy damp places especially those with many flowers.
The shiny metallic green colored fly (upper left on a squash leaf) is Condylostylus longicornis, a small insect (3 to 4 mm long) in the Family Dolichopodidae, Subfamily Sciapodinae known as “long-legged flies”. By feeding on aphids, thrips, and spider mites long-legged flies are helpful in the garden. Not much is known about the larvae but they are thought to be scavengers living in moist leaf litter or mulch.
The next two are syrphid flies (Family Syrphidae) and often mistaken for bees or yellow-jacket wasps because of the alternating stripes of black and yellow and their habit of feeding at flowers. Another name for them is “flower flies”. They are not bees or wasps and do not sting or bite but their appearance is meant to fool you into thinking they might. Eupeodes americanus (upper right on mustard flowers) looks very much like a yellow-jacket wasp and Toxomerus geminatus (lower left on the yellow cone-flower) a bit less so. Adult E. americanus are about 9 mm long and T. geminatus are about 6 to 7 mm long. Notice the pair of lines on T. geminatus that connect the abdominal stripes.
Adult E. americanus are nectar feeders but their larvae eat aphids. Adult T. geminatus are nectar and pollen feeders. Their larvae feed on feed on aphids and other soft-bodied insects like small caterpillars and scale insects. E. americanus and T. geminatus are thus very helpful insects in the garden. Plantings of dill, buckwheat, mustard, and poppies will attract the adults. Both species are widespread in North America and very common.
There is another insect with the Toxomerus geminatus on the yellow cone-flower and it is also a fly although we usually call it a mosquito. This mosquito (Family Culicidae, genus Ochlerotatus) is a female and while we may think of them as blood feeders they also drink nectar from flowers like this one is about to do. The thorax of this fly is white-spotted against a brown background. The abdominal section is striped brown and white. Many mosquitoes in the genus Ochlerotatus are vectors of disease. A recent introduction to the Upper Midwest of the US is the rock pool mosquito (Ochlerotatus japonicus) and is a potential carrier of West Nile virus. Native Ochlerotatus mosquitoes can also be vectors of viral diseases.
The last fly (lower right on a squash leaf) is Eugnoriste (probably E. brevirostris) a fungus gnat (Family Sciaridae). These little flies (1 to 3 mm long depending on species, this one is about 1.5 mm) thrive wherever there is damp decomposing vegetation like mulch, compost, and manure piles. The larvae feed on decomposing plant materials and manure. In greenhouses and mushroom caves the larvae of fungus gnats can become serious problems for growers when they begin to eat roots and fungal mycelium. Outside they are important in the cycle of decomposition. The adult fungus gnats feed on nectar but being so small they are not important pollinators.