It can be shown, via the construction of the representations of the symmetric group, that every representation of $S_n$ is equivalent to a representation with values in $\mathbb{Q}.$ Presumably, this is a fairly rare phenomenon: it clearly doesn't hold for cyclic groups ($\mathbb{Z}/p\mathbb{Z}$ has one-dimensional representations given by the $p$th roots of unity, hence $p-1$ of its representations lie outside of $\mathbb{Q}$).

Moreover, there is a formula which constructs the rational characters of a group (due to Artin: see Curtis and Reiner section 15), but it doesn't seem to give an answer to the following question:

Are there other "classes" of groups such that every irreducible representation is realizable over $\mathbb{Q}$?

Take "classes" to mean whatever you think appropriate (so long as it doesn't mean the collection of all groups with only rational irreps).

1more comment