$Y^{lm}(\theta,\varphi)$ are called the spherical harmonics, which are solutions to the angular part of time-independent Schrodinger equation, when you solve it in spherical polar coordinates $(r,\theta,\varphi)$.
$$ -\frac{\hbar^2}{2m}\ \nabla^2\psi\ +\ V\ \psi\ =\ E\ \psi$$
In spherical polar coordinates, the Laplacian reads
$$\nabla^2\ =\ \frac{1}{r^2}\frac{\partial}{\partial r}\left(r^2\frac{\partial}{\partial r}\right)\ +\ \frac{1}{r^2\sin \theta}\frac{\partial}{\partial \theta}\left(\sin \theta\ \frac{\partial}{\partial \theta}\right) \ +\ \frac{1}{r^2 \sin^2 \theta}\frac{\partial^2}{\partial \varphi^2}$$
Using separation of variables method, the wavefunction is expressed as
$$\psi(r,\theta, \varphi)\ =\ R(r)\ Y(\theta, \varphi)$$
This separates the radial and angular part of the wavefunction in two equations. The angular part can be further broken into $\theta$ and $\varphi$ parts. The equation in $\varphi$ so obtained has solutions of the form $e^{im\varphi}$. The equation in $\theta$ has associated Legendre polynomials, $P^m_l(\cos \theta)$ as solutions. Together they form the angular part of the wavefunction, $Y^{lm}(\theta, \varphi)$.
$l,m$ are respectively the azimuthal and magnetic quantum numbers. These, along with the principal quantum number $n$, are used to label different quantum states of the system as $\psi_{nlm}$.
$l$ can take values $0,1,2,\ldots, n-1$ and $m$ goes from $-l$ to $l$.
For studying rotation or dealing with systems with spherical geometry, it is convenient to work in spherical polar coordinates. For more details on Schrödinger equation in spherical coordinates, you can look up any standard textbook in Quantum Mechanics (e.g. Griffiths).