Here's the Coles notes. The formula for ticket pricing revolves around a system of five categories, which grades games according to their significance, such as dates and popularity of opponents.
There are, for instance, two “A-plus” games —Opening Day and Canada Day — followed by 32 “A” games, which feature key opponents such as the Yankees and Red Sox, as well as weekend series.
The rest of the games are B games (20), C games (18) and D games (9).