In what locally compact abelian groups does $\mathbb{Q}$ embed densely?

It can surely be embedded densely in many such groups. E.g. it can be embedded into $(S^1)^n$ for any $n$. (Here $S^1$ is the circle group.)

To see this, choose an element $\alpha$ in $(S^1)^n$ whose powers are dense in $(S^1)^n$.

Now for inductively, for each integer $m$, choose $\alpha_m$ such that $\alpha_m^m = \alpha$, in a compatible way (i.e. so that if $m' = d m,$ then $\alpha_{m'}^d = \alpha_m$). Then the $\alpha_m$ together generate a copy of $\mathbb Q$ inside $(S^1)^n$, which will be dense.

(A little more succintly, I am using the fact that $(S^1)^n$ is divisible, hence injective, to extend the embedding $\mathbb Z \hookrightarrow (S^1)^n$ to an embedding $\mathbb Q \hookrightarrow (S^1)^n$.)

Another way to think about this example, when $n = 2$ say, is that we take a line with irrational slope in $(S^1)^2$; this gives a dense copy of $\mathbb R$, which contains inside it a dense copy of $\mathbb Q$.