A study of more than 250,000 people aged 50-71 over 10 years showed that those who drank more than four cans of soda per or fruit juice per day were about 35% more likely to become depressed than those who did not drink them. Interestingly, those who drank four cups of coffee per day were 10% less likely to be depressed. Coffee, of course, contains caffeine, which may well act as a very mild antidepressant.
Surprisingly, those who drank diet sodas or diet fruit juices had a higher risk of depression. This data is an association, not necessarily a cause.