# Why do we need the Condon-Shortley phase in spherical harmonics?

I'm confused with different definitions of spherical harmonics:

$$Y_{lm}(\theta,\phi) = (-1)^m \left( \frac{(2l+1)(l-m)!}{4\pi(1+m)!} \right)^{1/2} P_{lm} (\cos\theta) e^{im\phi}$$

For example here they claim, that one can decide whether to include or omit the Condon-Shortley phase $(-1)^m$. And, also they claim this is useful in quantum mechanical operations, such as raising and lowering.

In The Theory of Atomic Spectra, Condon and Shortley state:

"If we had approached the problem through the usual form of the theory of spherical harmonics the natural tendency would have been to chose the normalizing factors with omission of the $(-1)^m$ in these formulas"

So the whole point of using $(-1)^m$ is that the following identity holds

$$Y_{l-m}(\theta,\phi) = (-1)^m Y_{lm}(\theta,\phi)^*$$

How is the Condon-Shortley phase used with these operations and why is this phase beneficial?

You don't need it: it's a sign convention and the only thing you need to do with it is to be consistent. (In particular, this means always checking that the sign and normalization conventions for $Y_{lm}$ and $P_l^m$ agree for all the sources that you're using, and correctly account for any differences there.)
The Condon-Shortley sign convention is built so that the spherical harmonics will play nicely with the angular momentum ladder operators: in particular, they enable you to write \begin{align} Y_l^m(\theta,\varphi) & = A_{lm} \hat{L}_-^{l-m} Y_l^l(\theta,\varphi), \quad \text{and} \\ Y_l^m(\theta,\varphi) & = A_{l,-m} \hat{L}_+^{l+m} Y_l^{-l}(\theta, \varphi), \end{align} where the $A_{lm}=\sqrt{\frac{(l+m)!}{(2l)!(l+m)!}}$ are all positive constants. This comes from Aarfken, 6th ed (2005), Eq. (12.162) p. 794, and it uses the conventions \begin{align} Y_l^m(\theta,\varphi) & = (-1)^m \sqrt{\frac{2l+1}{4\pi}\frac{(l-m)!}{(l+m)!}} P_l^m(\cos(\theta)) e^{im\varphi}, \text{ for} \\ P_n^m(\cos(\theta)) & = \frac{1}{2^n n!}(1-x^2)^{m/2} \frac{\mathrm d^{m+n}}{\mathrm d x^{m+n}}(x^2-1)^n ,\text{ and with}\\ L_\pm & = L_x\pm i L_y = \pm e^{i\varphi}\left[\frac{\partial}{\partial \theta} \pm i\cot(\theta) \frac{\partial}{\partial \varphi} \right] . \end{align} Ignoring the Condon-Shortley phase would introduce signs into the $A_{lm}$, which can be seen as (vaguely) undesirable - you want the awkward constants in the fiddly special-functiony side, which is always awkward to begin with, and not in the Hilbert-space side where clean relationships between wavefunctions and vectors are much more valuable.