My parents say that flies can lay eggs in the water (we do have flies occassionally buzzing around in our apartment). Is this true? If so, what is the longest time that a pitcher of tap water could be left sitting on a table untouched, and still be drinkable?
If you have a clean glass pitcher, the length of time we're talking is months, as mentioned by Tom's answer.
I think you have a few questions that I can clear up:
The bubbles that form over time are dissolved gases. From the faucet (or pitcher), the act of pouring will force some air into the water. Over time, it will warm up and you'll see bubbles form along the glass. This is absolutely harmless.
Flies laying eggs? Well, I wouldn't leave a glass pitcher out and uncovered, but I highly doubt this. Flies want to lay eggs in places where the hatching egg can live. For example, trash, spoiled fruit, the gunk in your drain, etc..
Chemical reactions with dissolved ions? Since most water in the US is fluoridated, there will be some very slow etching of the glass by fluoride ions. The amount of this will be very, very small, since it's a slow process. I think you'll easily be safe over the timescale of days to a week or two.
So what happens to water left at room temperature over a few days? Mainly the dissolved gasses come out. I find this water to taste "flat" even if I cool it again. But there's not much that will happen to the water.
More than a few days and I'd suggest making sure the water is capped or closed to avoid dust or other things falling into the water. Maybe find a closable glass container?
This excerpt speaks in part to your question.
When it comes to storing water for long periods, the answer is “Yes,” your H2O can certainly become unsafe to drink, says Zane Satterfield, an engineer scientist with the National Environmental Services Center at West Virginia University. “Most experts will tell you tap water has a shelf-life of six months,” Satterfield says. “After that point, the chlorine dissipates to the point that bacteria and algae start to grow.” That growth will speed up if you store your water in a warm or sunny spot—or in a glass container that hasn’t been thoroughly washed or sealed, he adds.
Consumable water by definition is chock full of compounds and molecules other than H20 which, obviously, have the power to sour water over time. This is perhaps just as well, as water at its purest grade is actually toxic. Known as clean water, and more particularly as ultra-pure water (UPW), it is manufactured for use industrially and, if drunk, draws minerals out of the human body like a magnet. See The Big Thirst by Charles Fishman for more details on the subject. Its relevance? If used for cooking or preparing food it would also draw out its minerals (up to some limit).
By and large however a question of this sort comes in as little more than esoteric, perhaps even pointless. Long before the water could develop anything in the way of health risks, (which itself is outside the scope of these discussions), the water would become simply unpalatable. Even many hours unattended can lead to this, in which case one would simply replace it with a fresh round.
Flies can certainly lay eggs in water left to sit around. But they are unlikely to be a concern, as the flies which are human parasites don't tend to be the water-egg-laying kind. If there are larvae in there, you'll just digest them, no harm done.
The problem can come from two directions: amoebae and bacteria. Amoebae can cause a kind of dysentery. And among the bacteria, Legionella can survive in water, and causes illness, including pneumonia.
I don't know how long tap water needs before it becomes dangerous, normally you shouldn't keep it out more than a few days.
Please note that in many countries only cold tapped water is guaranteed to be drinkable. The hot one is supposed to be at 75°C but may never reach this temperature or be kept at it way too long. Either way, when it gets mixed with the cold one, the temperature of the mixture is often very suitable for germs. So, in my experience, the cold water can be kept for couple weeks, especially if in glass container and in the fridge. However, I try to avoid drinking water that was warm for more than a day. I also find water in PET bottles to get a nasty by-taste after a week or so.