Brewed tea can spoil, because it can support bacterial growth. In fact, even processed tea bags can carry the bacteria they picked up while growing, being harvested or drying. Improperly handled, these bacteria can then contaminate the prepared drink.
However, steeping tea in water that is just off the boil can kill these micro-organisms. Thus, "sun tea," which is made by placing tea bags in containers of water sitting in the sun, does not have the heat necessary to kill these bacteria and should be avoided. Even after being prepared properly, brewed tea should not stand at room temperature for long periods of time.