No official Sonic the Hedgehog tower defense game exists.
Sega has tried Sonic in a wide range of genres over the years — racing, RPG, party games, and platformers above all — but tower defense has not been one of them. Fan-made browser games using the characters do circulate, though they are unofficial and vary wildly in quality.