Let the number of games Ahmadullah's basketball team played last season be \( x \). According to the problem, 21 games this season is 12 games more than 1/3 of the number of games they played last season.
We can set up the equation:
\[ 21 = \frac{1}{3}x + 12 \]
To solve for \( x \), we first isolate \( \frac{1}{3}x \):
\[ 21 - 12 = \frac{1}{3}x \]
\[ 9 = \frac{1}{3}x \]
Next, we multiply both sides by 3 to solve for \( x \):
\[ 27 = x \]
Therefore, the number of games they played last season is \( \boxed{27} \).