They are just eigen states of the angular momentum operator.
A more general definition is that they are eigenfunctions of the Laplacian operator on a sphere, which arise in many contexts.
Even more generally, see the huge body of beautiful mathematics that has arisen from the study of elliptic differential operators in general (de Rham cohomology, Hodge theory, the Atiyah-Singer index theorem, …).