This is probably a rat tailed maggot
or the larva of a syrphid fly. The adults are known as drone flies or also bee flies. A Google image
search matches very well. They are mostly harmless. Although accidental myiasis is possible - rat-tailed maggot wiki
Below is an excerpt from the U of Minnesota Extension
Mystery Insect Rat-tailed maggot.
Jeffrey Hahn, Assist. Extension Entomologist
People may sometimes encounter this unusual-looking insect larva. It's legless, has a cylindrical body and lacks any obvious head. It is about 1/2 - 3/4 inch long and possesses a very conspicuous, characteristic ‘tail'. Because of this long tail, this odd looking insect is known as a rat-tailed maggot.
This insect larva belongs to a group of flies known as syrphid flies. Syrphids are also known as flower flies or hover flies. They mimic bees or wasps and are very common on flowers and plant foliage. Despite their threatening appearance, all syrphid flies are harmless to people and are actually beneficial because they help pollinate plants. A rat-tailed maggot adult, sometimes referred to as a drone fly, resembles a honey bee.
Rat-tailed maggots are found in stagnant water that is high in organic matter. They are typically found in manure pits, polluted drainage ditches and water tanks, pools of runoff around manure mounds, and similar sites. They are particularly common around farms and fertilizer plants. Also look for them occasionally in urban areas where they can be associated with septic tank runoff or similar pools of stagnant, polluted water. There is also a reference of rat-tailed maggots associated with very wet, decaying plant matter.
The long ‘tail' on a rat-tailed maggot is actually a breathing tube that allows the insect to stay submerged in the water. This tube is normally about 3/4 inches long, but the insect can telescope it out to several times the length of its body. Rat-tailed maggots apparently feed on organic particles that are floating in the water. Although they live in aquatic environments as larvae, they crawl out of water and seek dry sites to pupate. Sometimes they crawl to dry land by the 100's. This mass movement can be a nuisance to people, especially when they travel into adjacent buildings, but they are otherwise harmless.