Rotations of spherical harmonics and Wigner $D$-matrices I seem to be having trouble understanding how Wigner D-matrices rotate spherical harmonics. I asked this question on the Maths Stack Exchange but decided to cast my net a bit wider and ask the question here too.
Suppose that we want to understand the effect of a rotation $R$ on the normal (spin-zero) spherical harmonic $Y^l_m(\vec{n})$, defined by a unit direction vector $\vec{n}$. Every textbook (and Wikipedia) I've consulted thus far has claimed that the rotated harmonic $Y^l_m(R^{-1}\vec{n})$ can be expressed as a linear combination of harmonics of the same order $l$
$$Y^l_m(R^{-1}\vec{n}) = \sum_{m'}D^{(l)}_{mm'}[R]Y^{l}_{m'}(\vec{n}),$$
where
$$D^{(l)}_{mm'}[R] \equiv \langle lm|R|lm'\rangle$$
are the Wigner D-matrices and $|lm\rangle$ are the usual eigen-vectors of the angular momentum operators $J_z$ and $\vec{J}^2$.
Now, I do not understand why the sum in the above equation only runs over $m'$. $l$ is associated with the inclination angle $\theta$ and $m$ is associated with the azimuthal angle $\phi$, both of which can be affected by a general rotation.  I suppose another way of phrasing this is: why is the $l$ index of the spherical harmonic left unaffected by a general rotation?
 A: Wider net is wise, given the responses on MSE.

I do not understand why the sum in the above equation only runs over ′.
 is associated with the inclination angle  and  is associated with the azimuthal angle , both of which can be affected by a general rotation. I suppose another way of phrasing this is: why is the  index of the spherical harmonic left unaffected by a general rotation?

Your second sentence here encapsulates your misconception! l is the representation index, and is associated with any and all rotations, of all angles,  and , in a given representation characterized by the Casimir invariant, $${\mathbf L}\cdot {\mathbf L} = l(l+1)~{\mathbb I}_{2l+1}.$$
Since this invariant commutes with rotations, any rotation will not mix its eigenspaces characterized by different l s: it will only scramble the m s, which is the very point (and genius!) of Wigner's rotation matrix.  $D^l_{mm'}$ is just the matrix that represents the rotation R on the $2l+1$-dimensional vector space (in the spherical basis ).
Rotations in  do not mix m components (they just rephase each differently), so they are diagonal D matrices; but rotations in   do, which is why Wigner defined them.
So, all rotations are considered and meaningful for a fixed l, unless you Kronecker-multiply representations.
As a result, the composition of two rotations amounts to mere matrix multiplication of two Ds with a common label l, ie, the active indices are just the ms. That's why we are talking matrices. They act on $2l+1$-dimensional subspaces, for which
$$
\sum_{m=-l}^l |l~m\rangle \langle l~m | 
$$
serves as the identity.
The $Y^m_l(\theta, \phi)= \langle \theta, \phi|l~m\rangle$ are a mere representation switch from compact angles to integer indices, and, geometrically,  amount to rotations from the middle of the z axis to a given point on the sphere for a given inclination and azimuth,
$$
D^{l}_{m 0}(\alpha,\beta,\gamma) = \sqrt{\frac{4\pi}{2l+1}} Y_{l}^{m*} (\beta, \alpha ) .
$$
As a result, the action of Ds on the Ys is effectively the composition of two rotations!
But we saw above that compositions of rotations are within each l subspace. The rest ought to be evident. To be sure, the linked expression mixes Euler angles and spherical/celestial angles, but, by taking simple examples, you may illustrate the point to yourself...
