Why sugar solution/sugarcane juice becomes sour when kept for certain time? I stir-dissolve some sugar in a cup of water and then keep it open for certain time (say a few hours), when I taste it I feel that it has became sour.
I have observed the same thing many times when I went to juice shop(s) and asked especially for sugarcane juice when I drank it, it tasted a bit sour (sometimes too sour to drink) and I just realized that the sugarcane (or other fruits) juice was extracted some hour(s) ago because I know that a fresh juice doesn't taste sour until kept (open) for a certain time.
From all this experience one thing I know is that the sugar solution or sugarcane (or other fruits) juice becomes more or less sour when kept for a certain time after extraction. It's most probably due to acid (which usually tastes sour) formation but I don't know what chemical changes turn a sugar solution or (sugarcane) juice sour (acidic) when kept for a certain time?
Any explanation will be greatly appreciated. Thanks.
This is not a complete answer but it should give you a head start.

I suspect two things: Fermentation and Caramelization.
In any fermentation process, sugar will turn into acid. It is observed from this answer from cooking.SE that at a temperature of 35-45 °C, fermentation occurs. If any sugar laden food is kept at this temperature, bacterial or yeast colony would flourish giving you the fermentation effects and making your food acrid. Fermentation process is a two-step process. First, glucose is turned to ethanol by Saccharomyces cerevisae, also known as Brewer's yeast. This ethanol is then converted to acetic acid by Acetobacter aceti, giving you the sour effect. This two-step process is called aerobic fermentation.

Caramelization generally occurs at higher temperatures, at 150-170 °C where sugars are broken down to simpler products and turning sugar into a brown-black mixture of products. This reaction is also called Maillard reaction. At this temperature, the reaction happens almost instantly but at lower temperature (35-45 °C), this reaction will takes hours, days or even months to finish it but it will speed up if there is moisture where it will take a few hours. Note that caramelization process is very complex as there are various steps. The finished product is a brown-black goo which is actually a mixture of several products. But if put it in a simplified way, sucrose breaks into glucose and fructose which further breaks into acetic acid, maltol, furan and many other products. This acetic acid contributes to the sour taste. So, in a hot-humid day, sugar can turn sour.