One lengthy explanation I found via Google.
Because,soft drinks contain many perishable components like artificial sweetner(ACESULFAME,CYCLAMATES,ASPARTAME etc.),antioxidants, foaming agents and preservatives like sodium benzoate, potassium benzoate, sodium citrate and benzoic acid.
The above mentioned sweetners and preservatives are a major component of many soft drinks.
On exposure to sunlight benzoates often degrade to form benzene (a popular CARCINOGEN).
To give a typical example,I must mention why USA government began to check the benzene-concentration in bottled- soft drinks.
Studies showed that, benzoic acid a well-known preservative undergoes decarboxylation to form benzene in the presence of ascorbic acid(Vitamin-C) and metal ions(iron and copper) that begins to act as catalyst specially under heat and sunlight(UV rays).
And once the preservatives get decomposed,there is nothing to inhibit the growth of yeast and fungus and they start feasting on the drink thus spoiling it.
And also the sweetners decompose to some extent in the presence of sunlight.
Not only this,the bottles containing soft drink is generally made up of Polyethylene Terephthalate (TFT) which breaks in the form of particles and forms colloidal mixture with the soft drinks,when exposed to sunlight for prolonged period.