No. Bananas aren't part of Sonic's diet.
His food of choice is chili dogs, a running gag across the games and animated series. If you're thinking of a blue speedster with a taste for fruit, that's a different character entirely.