Effective divisors exactly those with global sections

First of all you must assume more. Namely that a section corresponds to a monomorphism: $$\mathcal{O}_X\rightarrow \mathcal{O}_X(D)$$ You may clearly get rid of this by assuming that $X$ is integral.

Then there is a bijection between set of such sections up to a scaling by $\Gamma(X,\mathcal{O}^*_X)$ and effective divisors linearly equivalent with $D$. My answer below is given in the case of a the general ringed space, but you can read it assuming everywhere that $X$ is integral scheme.

Consider representation of $D$ given by a family $\{(U_i,f_i)\}_{i\in I}$, where $U_i\subseteq X$ is open and $f_i$ is a meromorphic(rational) function on $U_i$. Recall that $\mathcal{O}_X(D)$ is a subsheaf of the sheaf of meromorphic functions $\mathcal{K}_X$ on $X$ given as follows: $${\mathcal{O}_X(D)}_{\mid U_i}=\mathcal{O}_{ U_i}\frac{1}{f_i}$$ Now a section of this sheaf given by monomorphism: $$\mathcal{O}_X\rightarrow \mathcal{O}_X(D)$$ is the same as global invertible meromorphic function $f$ on $X$. For every $i\in I$ we can write: $$f_{\mid U_i}=\frac{r_i}{f_i}$$ for some regular $r_i\in \mathcal{O}_X(U_i)$. Now $\{(U_i,r_i)\}_{i\in I}$ give rise to an effective divisor linearly equivalent to $D$. This is just because: $$\frac{r_i}{f_i}=f_{\mid U_i}$$ so divisors $\{(r_i,U_i)\}_{i\in I}$ and $\{(f_i,U_i)\}_{i\in I}$ are linearly equivalent. This gives you a map in one direction. Reading argument backwards you may derive the map going into other direction.


If you happen to be in the situation where $X$ is a smooth projective variety over an algebraically closed field $k$, then we have the following bijection.

Let $|D|$ denote the set of effective divisors linearly equivalent to $D$. Then there is a bijection between $|D|$ and $\Gamma(X, \mathcal O(D)) -0$ mod $k^*$. If $E = D + (f)$, then $f \in \Gamma(X, \mathcal O(D)) -0$ (note any nonconstant multiple of $f$ will satisfy $E=D+(f)$ so we need to mod by $k^*$). Conversely if $f \in \Gamma(X, \mathcal O(D)) -0$, then $D+(f)$ is effective and clearly linearly equivalent to $D$. For the full details on when this is a bijection, see Hartshorne II.7.7.

In particular, $|D|$ is nonempty iff $\mathcal O(D)$ has a nonzero global section.