In 1D the wave equation $$\frac{\partial^2 u}{\partial t^2} = c^2 \frac{\partial^2 u}{\partial r^2}$$ can be satisfied with a wave $$u(r,t) = f(r-ct).$$
In 3D the wave equation $$\frac{\partial^2 u}{\partial t^2} = c^2 \frac{1}{r^2}\frac{\partial}{\partial r}\biggl(r^2 \frac{\partial u}{\partial r}\biggr)$$ can be satisfied with a wave $$u(r,t) = \frac{1}{r}\,f(r-ct)$$ whose amplitude fades to comply with conservation of energy.
One might expect that in 2D the wave equation $$\frac{\partial^2 u}{\partial t^2} = c^2 \frac{1}{r}\frac{\partial}{\partial r}\biggl(r \frac{\partial u}{\partial r}\biggr)$$ could be satisfied with a wave $$u(r,t) = \frac{1}{\sqrt r}\,f(r-ct),$$ but that's not the case. What is the reason for it?
Let's see what happends if we consider the $n$-dimensional wave equation for radial functions, $$ \newcommand{\pl}{\partial} \pl_t^2 u = c^2 r^{-(n-1)} \pl_r ( r^{n-1} \pl_r u) $$ and try an ansatz of the form $$ u(r,t) = r^{s} f(r-ct). $$ By direct computation, we find that \begin{align} \pl_t^2 u & = c^2 r^s f''(r-ct), \\ c^2 r^{-(n-1)} \pl_r ( r^{n-1} \pl_r u) & = c^2 r^s ( f''(r-ct) \\ & \phantom{=} + (n-1+2s) f'(r-ct) r^{-1} + s(n-2+s) f(r-ct) r^{-2} ). \end{align} These two match identically if $$ \begin{cases} n-1+2s = 0 ,\\ s(n-2+s) = 0. \end{cases} $$ There are two cases.
These are exactly the two cases mentioned in your question. As you see, there are no other dimensions in which such an ansatz works. Of course, it's nice to have a more conceptual explanation than just arithmetic coincidence; for this, see the comments.