I have showed most of my steps here so I hope that this is easy to follow.
I have the integral
$$A = C\int\limits_{0}^{2\pi}\int\limits_{0}^{\pi}Y^*(\theta, \phi)f(\theta,\phi)sin(\theta) d\theta d\phi$$
I have boundary conditions which say that $f(\theta, \phi) = u_0$ for the range $[0 \le \theta < \pi/2]$ and $f(\theta, \phi) = 0$ for the range $[\pi/2 \le \theta \le \pi]$.
$Y^*(\theta, \phi)$ is the spherical harmonic in which $m=0$, thus there is no $\phi$ dependence, such that:
$$Y^*(\theta, \phi) = Y(\theta, \phi) = \sqrt{\frac{(2l + 1)}{4\pi}} P_l(cos\theta)$$
where $P_l(cos\theta)$ is the Legendre polynomial.
Thus the integral becomes
$$A = u_0C\sqrt{\frac{(2l + 1)}{4\pi}}\int\limits_{0}^{2\pi}\int\limits_{0}^{\pi} P_l(cos(\theta))sin(\theta) d\theta d\phi$$
Let $x = cos(\theta)$ so that $d\theta = -\frac{dx}{sin(\theta)}$ which reduces the integral to
$$A = u_0C\sqrt{\frac{(2l + 1)}{4\pi}}\int\limits_{0}^{2\pi}\int\limits_{0}^{1} P_l(x) dx d\phi$$ (Notice that I have changed the limits for $x$ and then swapped them so that the negative sign would dissapear)
Finally, we can leave the Legendre polynomial integral as it is (we want it in this form), and only perform the integral over $\phi$ (which gives $2\pi$), leaving us with:
$$A = 2\pi u_0C\sqrt{\frac{(2l + 1)}{4\pi}}\int\limits_{0}^{1} P_l(x) dx $$ Is this correct? I got confused because at the start the functions depend on $\phi$ but I guess once applying the boundary conditions the dependence is removed, thus allowing me to do it this way?
Well, your function does not depend on $\phi$ for the very beginning therefore it is correct that you have no dependancy in the end :)
Some more details that I noticed:
"$f(\theta, \phi) = u_0$ for the range $[0 \le \theta < \pi/2]$" <- but you have to integrate over range $[0 \le \theta < \pi]$, what's the $f(\theta, \phi)$ for $[\pi/2 \le \theta < \pi]$?
When you do $x = cos(\theta)$, the limits should change to $-1$ and $1$ not $0$ and $1$.
I supopse the limits are wrong and you actually have to integrate over $[0 \le \theta < \pi/2]$...?