No, Sonic the Hedgehog doesn't appear in any episode of The Simpsons. Despite both being pop-culture heavyweights, the two franchises have never crossed over on the show.