From the movie's commentary  
Harold Ramis said:  

"We didn't use Punxsatawney for the film because Punxsatawney itself didn't have a real town center that looked very good on camera, so we wanted a town that looked perfect so the town you'll see is Woodstock, IL.

We scouted all of southern Wisconsin and northern Illinois looking for the perfect town and we pulled into Woodstock just the way the van pulls into town in the movie. It was the last town we saw and we looked at this little town square and though 'aw', this is perfect. This is what Punxsatawney should look like.

It has a courthouse where a very famous case was tried, there a jail attached to it - the lighter colored building. Eugene Debs, father of American Socialism, was tried there and was defended by Clarance Darrow. We played the beautiful building on the square as a hotel, but it's actually a beautifully restored Opera House. .

In the actual groundhog ceremony in Punxsatawney takes place in a park outside of town, almost like a forest preserve. But one thing we loved about this central square in Woodstock was that we could do the ceremony right here. The pavillion in the park is actually a large gazebo, but we built a pavillion for the groundhog that is an exact match to the one in Punxsatawney. They actually sent delegates from Punxsatwawney to make sure we were portraying the groundhog ceremony accurately. They were very jealous that the movie wasn't shot in Punxsatawney, but when they saw Woodstock they thought it looked better than their town.

© 2002 Columbia Pictures