According to the official site of the Punxsutawney Groundhog Club:
It is the day that the Groundhog comes out of his hole after a long winter sleep to look for his shadow.
If he sees it, he regards it as an omen of six more weeks of bad weather and returns to his hole.
If the day is cloudy and, hence, shadowless, he takes it as a sign of spring and stays above ground.
They even made a film about it in 1993 starring Bill Murray.