Groundhog Day wasn’t always a quirky tradition: it's rooted in the movements of the sun and dates back thousands of years.
Ancient civilizations use to rely on the sun and the stars to signal when to start planting crops, harvesting, or prepping for the cold winter ahead.
The Celts are credited with the characteristics most close to the modern calendar. For the Celts, four of the most important seasonal holidays were known as “cross-quarter days,” which marked the mid-point between the solstices and equinoxes. There was Beltane, which marks the first day of summer; Lughnasadh, which celebrated the first day of autumn; Samhain, which fell around November 1 and marked the beginning of winter; and Imbolc, which marked the beginning of spring.
Imbolc (pronounced ee-MOLG) fell right between the winter solstice and spring equinox, and is one of the ancient traditions that many point to as one of Groundhog Day's predecessors.
One of the legends is that on Imbolc, the creator (in their cultures personified as an old woman) would gather her firewood for the rest of the winter. According to the story, if she wished to make the winter last a good while longer, she will make sure the weather on Imbolc is bright and sunny, so she can gather plenty of firewood. Therefore, people...believed if February 2nd is a day of foul weather, it means that the creator was asleep and winter is almost over.
Over the centuries, people began to look for signs of the weather in all kinds of animals, from snakes to groundhogs. Ancient Germanic people, for example, would watch to see if a badger was spooked by its shadow, according to EarthSky.org. When British and German immigrants first came to the United States, they brought their traditions with them, including the celebrations that evolved into Groundhog Day.
Based on an article in smithsonian magazine