It hasn't always been groundhogs.
One day, in the course of that winter, the sun had come out for a while in the afternoon, but it was the second of February, that ancient Candlmas-day whose treacherous sun, the precursor of six weeks of cold, inspired Matthew Laensberg with the two lines, which have deservedly become classic:
Let it gleam or let it glimmer
The bear returns into his cave.
(Victor Hugo, Les Miserables, 1862, p. 730)Bears and groundhogs are both hibernating animals. I suspect it's a little safer to use groundhogs as official prognosticators. By the time Hugo published Les Miserables, it had already been uncovered that the name of the author of the Almanac of Liege was in doubt.
THE LIEGE ALMANAC
The celebrated almanac of "Francis Moore, physician," to whose predictions thousands are accustomed to look with implicit confidence and veneration, is rivalled, on the continent, by the almanac of Liege, by "Matthew Laensberg," who there enjoys an equal degree of celebrity.
Whether the name of Laensberg is a real or an assumed nаme is a matter of great doubt...The earliest of these almanacs known to exist is of the year 1636. It bears the name of Matthew Lansbert, mathematician, and not Laensberg, as it is now written.
-- The Table Book, W. Tegg, 1827, p. 138
More on the Candlemas origins of the holiday.