A lot of weather folklore has roots in actual human observance of weather conditions.
Take for instance the ring around the moon. A moon halo, like the one below, is said to indicate a snowstorm arriving soon, according to American folklore. The halo is produced by ice crystals in high, thin cirrus clouds. Those clouds, especially in winter months, arrive in advance of a storm. So, this folklore has some basis in real weather conditions and observations.
Figure 1: Moon halo caused by high level thin clouds... indicates snowy weather could be on the way in winter months.
The groundhog, though, is not so obviously tied to anything that I can find as a possible realistic observance of conditions and corresponding weather.
A cloudy day - no shadow seen by the varmint - varmint stays out of his hole - winter's over.
A sunny day - shadow seen by the varmint - varmint is frightened by said shadow and scurries back into his hole - winter's got another six weeks of fury.
The only thing I can think of that would indicate temperatures through shadows being or not being seen is the cloud effect. When clouds are present, nights are warmer. However, this can't be extrapolated out to six weeks.
So, try as I might, I can't find a link between Groundhog's Day and science.
That changes our mission. Instead of trying to take it seriously, let's look at Groundhog's Day for what it is: a day of fun folklore. A warning: I researched this on the 'net. Almost no source I found can be traced to original sources. So, don't use this as a factual report. I've given it my best shot, but I can't guarantee the factuality of all of this information.
How it started.
Groundhog's Day, on February 2nd, is about half-way between winter solstice and spring equinox. A pagan holiday called "Imbolc" was observed in the Middle Ages on the same date as present-day Groundhog's Day. Imbolc marked the midpoint between the solstice and the equinox, which generally marked the end of the coldest part of winter.
Figure 2: The Marsden Imbolc Fire Festival takes place in the beautiful Pennine Village of Marsden, West Yorkshire once a year.
In pre-1700s Germany, the holiday morphed into "Candleman's Day." Priests would bless candles and give them out to light the darkness of winter. The tradition of cloudy-that-day-means-winter's-over seems to have started here.
Figure 3: Candlemans Day is still celebrated as a special Mass in parts of Europe. Source for the photo unknown.
How it got to America.
When Germans settled the Northeast, they brought Candleman's Day with them. Then, Native American tradition got into the mix.
The Delaware Indians used Punxsutawney, Pennsylvania as a campsite.
Figure 4: Map showing Punxsutawney, Pennsylvania.
Also, their traditions were that animals were the ancestors of humans. Humans emerged from animals who emerged from the ground. Voila: groundhogs got into the story, displacing candles.
Pennsylvania's official celebration of Groundhog Day began on February 2nd, 1886 with a proclamation in The Punxsutawney Spirit by the newspaper's editor, Clymer Freas: "Today is groundhog day and up to the time of going to press the beast has not seen its shadow." The groundhog was given the name "Punxsutawney Phil, Seer of Seers, Sage of Sages, Prognosticator of Prognosticators, and Weather Prophet Extraordinary'' and his hometown thus called the "Weather Capital of the World.''