How did you can them? Pressure canning or water bath? How long ago did you can them? How long did you process them?
I ask these questions because 1) it doesn't matter how you processed them, if you opened a jar immediately out of the canner, they shouldn't taste sour unless you added vinegar or fermented them prior to canning, which you said you didn't. 2) If you only gave them a water bath, that does not completely sterilize low-acid food because in a low-acid environment botulism spores can survive the temperatures of a water bath canner. Low-acid foods should only be pressure canned (just stating this in advance, sorry if you knew this already). This wouldn't explain the sour taste though, because botulism is odorless and tasteless. Sugar can ferment causing a sour taste, but in a canning situation, this would only happen if other bacteria were not killed during processing, meaning no matter how you processed them, temps weren't high enough to kill everything, including botulism. Or, the lids didn't seal properly. 3) When in doubt, toss it out.