Ferris Bueller's Day Off was released in June of 1986, but when was the actual day that he caught the foul ball at Wrigley Field in Chicago? It was June 5th, 1985 when the Chicago Cubs hosted the Atlanta Braves. The visitors won the game in 11 innings after Rafael Ramirez homered off Lee Smith in front of 25,000+ fans.

According to Baseball Prospectus:

The foul ball that Ferris caught was hit by Atlanta right fielder Claudell Washington (#15) in the top of the 11th inning. The game was tied at two (not scoreless, like the pizza guy claimed) and backup second-baseman Paul Zuvella (#18) was being held on first by Leon Durham (#10) after a leadoff single.

 

But that's not the game shown on the TV as Principal Rooney is informed that 'The Bears' are winning the game.

The game shown on the TV was filmed on September 24, 1985, against the Expos. Montreal beat the Cubs 17-15, with future Cub Andrew Dawson smashing THREE Homers for the Expos. Ferris and the gang were just inserted into the footage to make it appear they were at THAT game.
Credit: spyboylfn via YouTube

FYI: Ferris didn't really catch a foul ball at the game. It's Hollywood. :)