Sonic's design as a hedgehog was a creative choice by his creators at Sega, and part of the appeal is simply that a fast, blue hedgehog is a fun, memorable, and cool-looking character.
The hedgehog concept tied nicely to the idea of speed and a spiky, streamlined silhouette that reads well in a game. In the end, it is a design that has made Sonic instantly recognizable and beloved by generations of players.