[proofplan]
We construct $\mathcal{O}(D)$ from local meromorphic equations for a divisor $D$ and record its canonical meromorphic section $s_D$. When $D$ is effective, this section is holomorphic, and its local vanishing orders recover $D$. Conversely, a nonzero holomorphic section of a line bundle defines an effective divisor by taking its local coefficient functions in holomorphic frames. The two constructions are inverse because the transition functions are exactly the ratios of those local coefficients. For arbitrary divisors, the same construction gives a homomorphism to $\operatorname{Pic}(M)$; its kernel is the subgroup of principal divisors, and its image is exactly the collection of line bundles carrying a nonzero meromorphic section.
[/proofplan]
[step:Construct the line bundle and canonical meromorphic section attached to a divisor]
Let $D \in \operatorname{Div}(M)$ be represented by an open cover $(U_i)_{i \in I}$ of $M$ and nonzero meromorphic functions
\begin{align*}
f_i: U_i \dashrightarrow \mathbb{C}
\end{align*}
such that $f_i/f_j \in \mathcal{O}^*(U_i \cap U_j)$ for every $i,j \in I$. Here $\mathcal{O}^*(U_i \cap U_j)$ denotes the group of nowhere-vanishing holomorphic functions on $U_i \cap U_j$.
Define holomorphic transition functions
\begin{align*}
g_{ij}: U_i \cap U_j &\to \mathbb{C}^*,\\
x &\mapsto \frac{f_i(x)}{f_j(x)}.
\end{align*}
Since
\begin{align*}
g_{ij}g_{jk}=\frac{f_i}{f_j}\frac{f_j}{f_k}=\frac{f_i}{f_k}=g_{ik}
\end{align*}
on triple overlaps, these functions define a holomorphic line bundle $\mathcal{O}(D)\to M$. Let $e_i$ denote the local holomorphic frame over $U_i$ with transition relation $e_j=g_{ij}e_i$ on $U_i\cap U_j$.
Define a meromorphic section
\begin{align*}
s_D: M \dashrightarrow \mathcal{O}(D)
\end{align*}
by the local formula
\begin{align*}
s_D|_{U_i}=f_i e_i.
\end{align*}
On $U_i\cap U_j$,
\begin{align*}
f_j e_j=f_j g_{ij}e_i=f_j\frac{f_i}{f_j}e_i=f_i e_i,
\end{align*}
so the local expressions glue to a well-defined global meromorphic section. Its divisor is $D$, because in the local frame $e_i$ the coefficient function of $s_D$ is exactly $f_i$.
If $D$ is effective, each local defining function $f_i$ may be chosen holomorphic. Then each local expression $f_i e_i$ is holomorphic, so $s_D \in H^0(M,\mathcal{O}(D))$ is a nonzero holomorphic section.
[/step]
[step:Recover an effective divisor from a nonzero holomorphic section]
Let $L\to M$ be a holomorphic line bundle, and let $s\in H^0(M,L)$ be nonzero. Choose an open cover $(V_a)_{a\in A}$ of $M$ on which $L$ admits a holomorphic frame, and for each $a\in A$ choose a nowhere-vanishing holomorphic frame
\begin{align*}
e_a: V_a \to L|_{V_a}.
\end{align*}
There are unique holomorphic functions
\begin{align*}
h_a: V_a &\to \mathbb{C}
\end{align*}
such that
\begin{align*}
s|_{V_a}=h_a e_a.
\end{align*}
On $V_a\cap V_b$, write $e_b=t_{ab}e_a$, where
\begin{align*}
t_{ab}: V_a\cap V_b \to \mathbb{C}^*
\end{align*}
is the transition function of $L$. Then
\begin{align*}
h_a e_a=s|_{V_a\cap V_b}=h_b e_b=h_b t_{ab}e_a,
\end{align*}
hence
\begin{align*}
h_a=t_{ab}h_b.
\end{align*}
Because $t_{ab}$ is nowhere-vanishing and holomorphic, the zero divisors of $h_a$ and $h_b$ agree on $V_a\cap V_b$. Therefore the local zero divisors $\operatorname{div}(h_a)$ glue to a global effective divisor, denoted $\operatorname{div}(s)$.
The section $s$ is nonzero as a global section, so not all functions $h_a$ vanish identically. Since the coefficient functions transform by multiplication by nowhere-vanishing holomorphic functions, the resulting divisor is independent of the chosen cover and frames.
[/step]
[step:Show the two constructions are inverse for effective divisors]
Start with an effective divisor $D$ represented by holomorphic local equations $(f_i)_{i\in I}$ on an open cover $(U_i)_{i\in I}$. By construction, the pair attached to $D$ is $(\mathcal{O}(D),s_D)$, where $s_D|_{U_i}=f_i e_i$. Applying the section-to-divisor construction to $s_D$, the local coefficient of $s_D$ in the frame $e_i$ is $f_i$, so the recovered divisor is precisely $D$.
Conversely, start with a pair $(L,s)$ with $s\ne 0$. Choose local frames $e_a$ over $V_a$ and write $s|_{V_a}=h_a e_a$. The divisor $\operatorname{div}(s)$ is represented by the local holomorphic functions $h_a$. The line bundle $\mathcal{O}(\operatorname{div}(s))$ has transition functions
\begin{align*}
\frac{h_a}{h_b}: V_a\cap V_b \to \mathbb{C}^*.
\end{align*}
Since $h_a=t_{ab}h_b$, these transition functions equal $t_{ab}$, the transition functions of $L$ in the chosen frames. Therefore the correspondence $e_a^{\operatorname{div}(s)}\mapsto e_a$ defines a holomorphic line bundle isomorphism
\begin{align*}
\Phi:\mathcal{O}(\operatorname{div}(s)) \to L.
\end{align*}
Under this isomorphism,
\begin{align*}
\Phi(s_{\operatorname{div}(s)}|_{V_a})=\Phi(h_a e_a^{\operatorname{div}(s)})=h_a e_a=s|_{V_a},
\end{align*}
so $\Phi(s_{\operatorname{div}(s)})=s$. Thus the two assignments are inverse up to the required isomorphism of pairs.
[/step]
[step:Verify that the divisor construction descends modulo principal divisors]
Let $D,E\in \operatorname{Div}(M)$ be represented on a common open cover $(U_i)_{i\in I}$ by meromorphic functions $f_i$ and $q_i$, respectively. The divisor $D+E$ is represented by the local meromorphic functions $f_iq_i$. The transition functions of $\mathcal{O}(D+E)$ are
\begin{align*}
\frac{f_iq_i}{f_jq_j}
=
\frac{f_i}{f_j}\frac{q_i}{q_j},
\end{align*}
which are the product of the transition functions of $\mathcal{O}(D)$ and $\mathcal{O}(E)$. Hence
\begin{align*}
\mathcal{O}(D+E)\cong \mathcal{O}(D)\otimes \mathcal{O}(E),
\end{align*}
so $D\mapsto \mathcal{O}(D)$ is a group homomorphism from $\operatorname{Div}(M)$ to $\operatorname{Pic}(M)$.
Let $\varphi: M\dashrightarrow \mathbb{C}$ be a nonzero global [meromorphic function](/page/Meromorphic%20Function), and let $\operatorname{div}(\varphi)$ be its principal divisor. This divisor is represented by the single local meromorphic function $\varphi$ on every trivializing [open set](/page/Open%20Set). Therefore all transition functions of $\mathcal{O}(\operatorname{div}(\varphi))$ are
\begin{align*}
\frac{\varphi}{\varphi}=1,
\end{align*}
so $\mathcal{O}(\operatorname{div}(\varphi))$ is holomorphically isomorphic to $M\times \mathbb{C}$. Thus every principal divisor lies in the kernel, and the homomorphism descends to
\begin{align*}
\operatorname{Div}(M)/\operatorname{Prin}(M)\to \operatorname{Pic}(M).
\end{align*}
[/step]
[step:Identify the kernel as the principal divisors]
Suppose $D\in \operatorname{Div}(M)$ and $\mathcal{O}(D)$ is holomorphically isomorphic to $M\times \mathbb{C}$. Choose a holomorphic line bundle isomorphism
\begin{align*}
\Psi:\mathcal{O}(D)\to M\times \mathbb{C}.
\end{align*}
Let
\begin{align*}
1_M: M\to M\times \mathbb{C}
\end{align*}
denote the constant holomorphic frame of the product line bundle. Since $s_D$ is a nonzero meromorphic section of $\mathcal{O}(D)$, there is a unique nonzero meromorphic function
\begin{align*}
\varphi: M\dashrightarrow \mathbb{C}
\end{align*}
such that
\begin{align*}
\Psi(s_D)=\varphi\,1_M.
\end{align*}
Holomorphic line bundle isomorphisms are locally multiplication by nowhere-vanishing holomorphic functions, so they do not change the local order of zeros or poles of a meromorphic section. Hence
\begin{align*}
\operatorname{div}(\varphi)=\operatorname{div}(s_D)=D.
\end{align*}
Thus $D=\operatorname{div}(\varphi)$ is principal. The kernel of $\operatorname{Div}(M)\to\operatorname{Pic}(M)$ is therefore exactly $\operatorname{Prin}(M)$, and the induced map on the quotient is injective.
[/step]
[step:Characterize the image by meromorphic sections]
For every divisor $D$, the line bundle $\mathcal{O}(D)$ carries the canonical nonzero meromorphic section $s_D$. Hence every line bundle in the image admits a nonzero meromorphic section.
Conversely, let $L\to M$ be a holomorphic line bundle admitting a nonzero meromorphic section
\begin{align*}
\sigma: M\dashrightarrow L.
\end{align*}
Choose an open cover $(W_\alpha)_{\alpha\in A}$ of $M$ by open sets admitting holomorphic frames for $L$, and choose holomorphic frames
\begin{align*}
\epsilon_\alpha: W_\alpha\to L|_{W_\alpha}.
\end{align*}
There are unique meromorphic functions
\begin{align*}
m_\alpha: W_\alpha\dashrightarrow \mathbb{C}
\end{align*}
such that
\begin{align*}
\sigma|_{W_\alpha}=m_\alpha \epsilon_\alpha.
\end{align*}
On $W_\alpha\cap W_\beta$, write $\epsilon_\beta=u_{\alpha\beta}\epsilon_\alpha$, where
\begin{align*}
u_{\alpha\beta}: W_\alpha\cap W_\beta\to \mathbb{C}^*
\end{align*}
is holomorphic and nowhere vanishing. Then
\begin{align*}
m_\alpha=u_{\alpha\beta}m_\beta,
\end{align*}
so $m_\alpha/m_\beta=u_{\alpha\beta}\in\mathcal{O}^*(W_\alpha\cap W_\beta)$. Therefore the functions $m_\alpha$ define a divisor $D=\operatorname{div}(\sigma)$.
By construction, $\mathcal{O}(D)$ has transition functions $m_\alpha/m_\beta$, which are exactly the transition functions $u_{\alpha\beta}$ of $L$ in the chosen frames. Hence $\mathcal{O}(D)\cong L$. This proves that the image of
\begin{align*}
\operatorname{Div}(M)/\operatorname{Prin}(M)\to\operatorname{Pic}(M)
\end{align*}
is precisely the set of isomorphism classes of holomorphic line bundles admitting a nonzero meromorphic section.
[/step]