In the past, many events and days became part of weather-related folklore.
Red sky at night, shepherd's delight, red sky in the morning, shepherd's warning is short-term- forecast (and is accurate because red sky at night matches a high pressure and fine weather, while red sky in the morning tells of the approach of a weather front and rain or snow).
Many folklore forecasts were related to saints. St Swithun's Day is one that is widely known. If it rains on St Swithun's Day (July 15), there will be 40 days of rain, so the myth goes.
St Swithun's day if thou dost rain
For forty days it will remain
St Swithun's day if thou be fair
For forty days 'twill rain nae mare
Groundhog Day (Feb 2) is another of these. It started in Dutch tradition in Europe. In America it comes from the Pennsylvania Dutch superstition that if a groundhog (a ground squirrel, or marmot) comes out of hibernation and sees a shadow due to clear weather (a high pressure), it will retreat back to its den, and winter will last for six more weeks. If it doesn't see its shadow because of cloudy skies, spring will arrive early.
This one, which was first celebrated in the U.S. in 1840) was actually transplanted from European German-speaking areas where the badger (German: Dachs) is used to forecast spring. The original weather-predicting animal in Germany had been the bear, another hibernating mammal, but when they grew scarce the lore became altered.
This in turn comes from even earlier, when it was believed that if the religious day of Candlemass, which is 40th day of Christmas, and thus Feb 2. Clear weather on Candlemass again told of a high pressure, and so a long winter.
"If Candlemass is fair and clear / There'll be twa winters in the year" (Scots dialect)
Of course, the weather pattern in Eastern America is not at all the same as that in Western Europe, and it is related to an animal with quite different habits, so it's forecasting is even more unlikely to be useful.
But locally in Pennsylvania, it turned into a local feast day, and gradually other people in other parts of the country (and now world) thought that was a good idea, too – especially restaurant owners!
More recently still, it has been taken over by people wishing to make money out of celebrations, and groundhog day is often used as an excuse for sales in stores.
In Irish folk tradition St. Brighid's Day, 1 February, is the first day of Spring, and thus the start of the farmer's year.