Principal divisors on a compact Riemann surface

That is not true. Here a counterexample: consider a Riemann surface $X$ of genus $g \geq 1$. Fix $p, q \in X$ distinct points and consider the divisor $D = p - q$. This divisor has degree $0$, but it is not principal, because on the contrary there would be a holomorphic map $f: X \rightarrow \overline{\mathbb{C}}$ of degree equal to $1$ (for it has single simple zero/infinity value), and it is well known that a such map with this property is an isomorphism. That is a contradiction, since $g(\overline{\mathbb{C}}) = 0$. Look for Abel-Jacobi Theorem for necessary and sufficient conditions for a divisor be principal.


Rafael answer shows that if every degree zero divisor on $X$ is principal then $X$ is isomorphic to the Riemann sphere $\mathbb{C}_{\infty}$.

The converse also holds true, i.e., every degree zero divisor $D$ on $\mathbb{C}_{\infty}$ is principal. To see this just note that if $D = \sum n_i \cdot z_i + n_{\infty}\cdot \infty$ and $n_\infty = - \sum n_i$ then $f(z) = \Pi (z-z_i)^{n_i} $ is a rational function (hence meromorphic on $\mathbb{C}_{\infty}$) such that div$(f) = D$.