Tradition in Germany (where groundhog day has its' origins) claims that a badger or hedgehog would predict the coming of spring. If the animal saw its' shadow on Candlemas, winter weather would continue. German settlers moved to the United States and continued the tradition. However, since there weren't hedgehogs or badgers where they lived, they chose the groundhog as the weather prognosticator.
(Curtesy of https://hubpages.com/holidays/groundhog-day-fun-fa )