From the movie’s commentary
Harold Ramis said:  

“We didn’t use Punxsutawney for the film because Punxsutawney 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 thought ‘aw’, this is perfect. This is what Punxsutawney should look like.

The actual groundhog ceremony in Punxsutawney 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 pavilion in the park is actually a large gazebo, but we built a pavilion for the groundhog that is an exact match to the one in Punxsutawney. They actually sent delegates from Punxsutawney to make sure we were portraying the groundhog ceremony accurately. They were very jealous that the movie wasn’t shot in Punxsutawney, but when they saw Woodstock they thought it looked better than their town.

© 2002 Columbia Pictures