Let $K$ be a splitting field of $f$ over $\mathbb{Q}$. Since $f$ is irreducible, it is in particular separable; let $\theta_1$, $\theta_2$, ..., $\theta_n$ be the roots of $f$ in $K$. Then $G:=\text{Gal}(K/\mathbb{Q})$ permutes the $\theta_i$, and we can thus think of $G$ as a subgroup of $S_n$. (In fact, everything I say here is also true for reducible, but separable, polynomials, such as $(x^2-2)(x^2-3)(x^2-6)$.)
Let $p$ be an unramified prime for $K$. Then $p$ has an associated Frobenius conjugacy class $\text{Frob}(p)$ in $G$. The irreducible factors of $f(x) \bmod p$ are in bijection with the cycles of $\text{Frob}(p)$, and the degrees of the irreducible factors are equal to the lengths of the cycles. In particular, $f(x)$ is irreducible modulo $p$ if and only if $\text{Frob}(p)$ is an $n$-cycle.
By the Cebotarov density theorem, the fraction of $p$ for which this occurs is $\#(\text{$n$-cycles in $G$})/\#(G)$.
I wrote this up in a blogpost years ago. I learned it from Janusz but, for some reason, Janusz wrote everything in terms of a group $G$ and an index $n$ subgroup $H$ (the stabilizer of $\theta_1$), rather than describing $G$ as a subgroup of $S_n$. I'm curious to hear what sources others would recommend.