How Groundhog Day is connected to astronomy

How did we come to celebrate our favorite weather-predicting rodent on Groundhog Day? It actually has a tie-in with astronomy and the time of year.