We have $f(0) = f(0)f(b)$ hence, if $f$ is not the constant function equal to $1$, we have $f(0) =0$. If $f$ is not the constant function equal to $0$, then we can find $k\in\mathbb{N}^*$ such that $f(z) = z^kg(z)$ with $g(0)\neq 0$ and $g$ analytic. We get for $a,b\neq 0$ that $g(a)g(b) =g(ab)$ and by continuity for all $a$ and $b$. We have $g(0)=g(0)g(b)$ hence $g(z)=1$ for all $z$. Finally the only solutions are $f(z)=0$, $f(z)=1$ and $f(z)=z^k, k\in\mathbb{N}$.
We only used the fact that the unit disc is connected; the result can be extended to each open connected subset of $\mathbb C$ which contains $0$.