The Associated Legendre Polynomials (or Functions) occur whenever you solve a differential equation containing the Laplace operator in spherical coordinates with a separation ansatz.
These functions are of great importance in quantum physics, for example, because they appear in the solutions of the Schrodinger equation in spherical polar coordinates.
The Schrödinger equation, $Hψ=Eψ$, of the hydrogen atom in polar coordinates is:
$$
-\frac{\hbar^2}{2\mu}\left[\frac{1}{r^2}\frac{\partial}{\partial r}\left(r^2\frac{\partial\psi}{\partial r}\right)+\frac{1}{r^2\sin\theta}\frac{\partial}{\partial\theta}\left(\sin\theta\frac{\partial\psi}{\partial\theta}\right)+\frac{1}{r^2\sin^2\theta}\frac{\partial^2\psi}{\partial\phi^2}\right]-\frac{Ze^2}{4\pi\epsilon_0r}\psi=E\psi
$$
that is
$$
\frac{1}{r^2}\frac{\partial}{\partial r}\left(r^2\frac{\partial\psi}{\partial r}\right)+\frac{1}{r^2\sin\theta}\frac{\partial}{\partial\theta}\left(\sin\theta\frac{\partial\psi}{\partial\theta}\right)+\frac{1}{r^2\sin^2\theta}\frac{\partial^2\psi}{\partial\phi^2}+\frac{2\mu}{\hbar^2}\left(E+\frac{Ze^2}{4\pi\epsilon_0r}\right)\psi=0
$$
Using the Separation of Variables idea, we assume a product solution of a radial and an angular function:
$$\psi(r,\theta,\phi)=R(r)\cdot Y(\theta,\phi)$$
Therefore, we can separate into a radial equation
$$\frac{\rm d}{{\rm d}r}\left(r^2\frac{{\rm d}R}{{\rm d}r}\right)+\frac{2\mu r^2}{\hbar^2}\left(E+\frac{Ze^2}{4\pi\epsilon_0r}\right)R-AR=0$$
and an angular equation:
$$
\frac{1}{\sin\theta}\frac{\partial}{\partial\theta}\left(\sin\theta\frac{\partial Y}{\partial\theta}\right)+\frac{1}{\sin^2\theta}\frac{\partial^2Y}{\partial\phi^2}+AY=0
$$
where $A$ is the separation constant.
The solutions of the angular equation are the spherical harmonics
$$
Y_\ell^m (\theta, \varphi ) = \sqrt{\frac{(2\ell+1)(\ell-m)!}{4\pi(\ell+m)!}} \,e^{i m \varphi } P_\ell^m (\cos{\theta} )
$$
a product of trigonometric functions, here represented as a complex exponential, and associated Legendre polynomials $P_\ell^m (\cos{\theta} )$ and the quantity in the square root is a normalizing factor.
Look this for futher explanation.