When is the global section functor exact?
If $X$ is Noetherian, Serre proved that $X$ is affine if and only if $H^i(X,\mathcal{F}) = 0$ for all quasi-coherent $\mathcal{F}$ and $i > 0$.
The latter condition is equivalent to $\Gamma(X,-)$ being an exact functor.