Consider the orbital angular momentum operators $L^2$ and $L_z$. In the $|\mathbf{r}\rangle$ representation using spherical coordinates those operators actions are given by
$$L^2\varphi(\mathbf{r})=-\hbar^2\left(\dfrac{\partial^2}{\partial\theta^2}+\dfrac{1}{\tan \theta} \dfrac{\partial}{\partial \theta}+\dfrac{1}{\sin^2\theta}\dfrac{\partial^2}{\partial\phi^2}\right)\varphi(\mathbf{r})$$
$$L_z\varphi(\mathbf{r})=-i\hbar \dfrac{\partial}{\partial \phi}\varphi(\mathbf{r}).$$
Now, we know that $[L^2,L_z]=0$ so that it is possible to construct a basis of state space of simultaneous eigenstates of both $L^2 $ and $L_z$. We also know that the eigenvalues of $L^2$ are of the form $l(l+1)\hbar^2$ with $l$ integral or half-integral. On the other hand the eigenvalues of $L_z$ are of the form $m\hbar$ and with fixed $l$ we have that $m$ can only take on the values $-l,-l+1,\dots,l-1,l$. The simultaneous eigenvalue equations are then
$$L^2\psi(r,\theta,\phi)=l(l+1)\hbar^2\psi(r,\theta,\phi)$$
$$L_z\psi(r,\theta,\phi)=m\hbar \psi(r,\theta,\phi)$$
Now, the book I'm studying (Cohen's Quantum Mechanics book) states the following:
In the eigenvalue equations, $r$ does not appear in any differential operator, so we can consider it to be a parameter and *take into account only the $\theta$- and $\phi$-dependence of $\psi$. Thus, we denote by $Y_l^m(\theta,\phi)$ a common eigenfunction of $L^2$ and $L_z$ which corresponds to the eigenvalues $l(l+1)\hbar^2$ and $m\hbar$.
$$L^2Y^m_l(\theta,\phi) = l(l+1)\hbar^2Y^m_l(\theta,\phi)$$
$$L_zY^m_l(\theta,\phi)=m\hbar Y^m_l(\theta,\phi)$$
That equations give the $\theta$- and $\phi$-dependence of the eigenfunctions of $L^2$ and $L_z$. Once the solutions $Y^m_l(\theta,\phi)$ of these equations has been found, these eigenfunctions will be obtained in the form:
$$\psi_{l,m}(r,\theta,\phi)=f(r)Y^m_l(\theta,\phi)$$
where $f(r)$ is a function of $r$ which appears as na integration constant for the partial differential equation.
Now, I don't see how the author concludes that given $l$ and $m$ the eigenfunction $\psi_{l,m}$ is of the form $\psi_{l,m}(r,\theta,\phi) = f(r)Y^m_l(\theta,\phi)$. This conclusion to come out from thin air. By the way things are written it seems that $Y^m_l$ is by definition the eigenfunction corresponding to $l$ and $m$. But then the author states that the eigenfunction is really $\psi_{l,m}(r,\theta,\phi)=f(r)Y^l_m(\theta,\phi)$.
Indeed the equations defining the eigenfunctions of $L^2$ and $L_z$ are differential equations. Viewing from this point, $\psi_{l,m}$ is the form of a separable solution. But there are the ones which are not separable.
In general, considering the way the author presented things, how does he conclude the general form of eigenfunctions and what is his point on calling $Y^m_l$ the angular dependence of the eigenfunctions