Sour candy is sour because of the acidity level. The Minnesota Dental Association has compiled a chart listing several popular sour candies, all of which are acidic enough to cause tooth enamel loss and some of which are almost as acidic as battery acid! Here’s part of the chart:
Update: I meant to add that the ph scale is logarithmic (like the Richter scale) so that a pH of 3.0 is 10 times more acidic than a pH of 4.0. That means that even the pH 1.6 & 1.8 candies on the list aren’t quite battery acid, but it also means that a pH 2.0 candy has 100x more acidity than is required to cause enamel loss, not just 2x.