Since you're solving the <PERSON> equation in spherical coordinates, $V(r,\theta,\phi) = R(r)\Theta(\theta)\Phi(\phi)$, $0\leq\theta\leq \pi$, $0\leq \phi\leq 2\pi$ and $\Phi''(\phi) = -m^2 \Phi(\phi)$, the coordinate values $\phi=2\pi n$, $n\in \mathbb{Z}$ represent the same point, therefore we must have $V(r,\theta,\phi=0) = V(r,\theta,\phi=2\pi n)$ $\forall n\in \mathbb{Z}$, which can only be true for $m \in \mathbb{Z}$ ($n$ is an integer and so should be $nm$, therefore $m$ must be an integer, too).
The radial part is $$\frac{1}{R}\frac{d}{dr}\left( r^2 \frac{ dR}{dr} \right) = k.$$ This becomes $r^2 R''(r)+ 2r R(r)-kR=0$, the <PERSON> equation with solutions of the form $R\propto r^a$. If we substitute this, we obtain an equation quadratic in $a$, which yields $a = (-1 \pm \sqrt{ 1 + 4k})/2$. We define the one solution as $l\equiv (-1 + \sqrt{1 + 4k})/2$, therefore the other is $-1-l$, $k = l(l+1)$, hence the diff. 804
eq. has solution $R(r) = Ar^l + \frac{B}{r^{1+l}}$, and the Laplace becomes: $$\frac{1}{\sin \theta} \frac{d}{d\theta} \left( \sin \theta \frac{d\Theta}{d\theta} \right)+ \left[ l(l+1) - \frac{m^2}{\sin^2\theta} \right] \Theta =0.$$ We substitute $x \equiv \cos \theta$, hence $$\frac{d}{dx} \left[ ( 1-x^2) \frac{d \Theta}{d \theta} \right] + \left[ l(l+1) - \frac{m^2}{1- x^2} \right] \Theta = 0,$$ the associated Legendre equation. For $m=0$ the solution that does not diverge at $x=\pm 1$ is the Legendre polynomials, $P_l(x)$ for $l=0,1,2,\ldots$; for other values of $m$ we use the <PERSON>-like formula $$P^m_l(x) = (-1)^m (1-x^2)^{m/2} \frac{d^m}{dx^m} P_l(x),$$ from which we see that $l=0,1,2,\ldots$ for every value of $m$. For $0\leq m \leq l$, the solution of the angular part comprises the spherical harmonics, $Y_{lm}(\theta,\phi)\propto e^{im\phi} P_{l}^m(\cos\theta)$, with $P_l^m$ the associated Legendre functions. 804