[proofplan]
We encode a Cousin II datum as a multiplicative Čech cocycle with coefficients in the sheaf $\mathcal{O}^*$, so solving the datum is exactly killing its class in $H^1(X,\mathcal{O}^*)$. The exponential sheaf sequence produces a long exact cohomology sequence in which the boundary map $H^1(X,\mathcal{O}^*) \to H^2(X,\mathbb{Z})$ is the first Chern class. Exactness then shows that $H^1(X,\mathcal{O})=0$ makes the Chern class map injective, and the additional vanishing $H^2(X,\mathbb{Z})=0$ forces $H^1(X,\mathcal{O}^*)=0$.
[/proofplan]
[step:Encode Cousin II data as multiplicative cohomology classes]
Let $\mathcal{O}$ denote the sheaf of holomorphic functions on $X$, viewed as a sheaf of abelian groups under addition, and let $\mathcal{O}^*$ denote the sheaf of nowhere-vanishing holomorphic functions on $X$, viewed as a sheaf of abelian groups under multiplication.
In the sheaf-theoretic formulation, a Cousin II datum on an open cover $\mathfrak{U}=\{U_i\}_{i\in I}$ is a family of holomorphic maps
\begin{align*}
g_{ij}:U_i\cap U_j &\longrightarrow \mathbb{C}^*
\end{align*}
satisfying the multiplicative cocycle condition
\begin{align*}
g_{ij}(x)g_{jk}(x)g_{ki}(x)=1
\end{align*}
for every $x\in U_i\cap U_j\cap U_k$. A solution is a family of holomorphic maps
\begin{align*}
h_i:U_i &\longrightarrow \mathbb{C}^*
\end{align*}
such that
\begin{align*}
g_{ij}(x)=h_j(x)h_i(x)^{-1}
\end{align*}
for every $x\in U_i\cap U_j$.
Thus a datum is solvable exactly when its class in $H^1(X,\mathcal{O}^*)$ is zero. By the classification of holomorphic line bundles by $H^1(X,\mathcal{O}^*)$, this is equivalently the statement that the associated holomorphic line bundle is holomorphically straightforward. Therefore all Cousin II data are solvable if and only if $H^1(X,\mathcal{O}^*)=0$.
[guided]
We first translate the analytic Cousin II problem into cohomology. The sheaf $\mathcal{O}$ assigns to each open set $U\subseteq X$ the additive group of holomorphic functions on $U$, and the sheaf $\mathcal{O}^*$ assigns to $U$ the multiplicative group of holomorphic maps $U\to\mathbb{C}^*$.
Choose an open cover $\mathfrak{U}=\{U_i\}_{i\in I}$. A Cousin II datum is represented by transition functions
\begin{align*}
g_{ij}:U_i\cap U_j &\longrightarrow \mathbb{C}^*
\end{align*}
which are holomorphic and nowhere zero. The compatibility condition on triple overlaps is
\begin{align*}
g_{ij}(x)g_{jk}(x)g_{ki}(x)=1
\end{align*}
for every $x\in U_i\cap U_j\cap U_k$. This is precisely the Čech $1$-cocycle condition for the sheaf $\mathcal{O}^*$.
A solution means that the transition functions can be removed by changing local representatives. Concretely, this asks for holomorphic nowhere-zero maps
\begin{align*}
h_i:U_i &\longrightarrow \mathbb{C}^*
\end{align*}
such that
\begin{align*}
g_{ij}(x)=h_j(x)h_i(x)^{-1}
\end{align*}
on every overlap $U_i\cap U_j$. The right-hand side is the multiplicative Čech coboundary of the $0$-cochain $(h_i)_{i\in I}$. Therefore the datum is solvable exactly when the cohomology class represented by $(g_{ij})$ is the zero class in $H^1(X,\mathcal{O}^*)$.
Finally, every class in $H^1(X,\mathcal{O}^*)$ is represented by such transition functions, equivalently by a holomorphic line bundle, by the classification of holomorphic line bundles by $H^1(X,\mathcal{O}^*)$. Hence every Cousin II datum is solvable if and only if every class of $H^1(X,\mathcal{O}^*)$ is zero, which is exactly the condition $H^1(X,\mathcal{O}^*)=0$.
[/guided]
[/step]
[step:Apply the exponential sheaf sequence to isolate the obstruction maps]
Let $\mathbb{Z}$ denote the constant sheaf of locally constant integer-valued functions on $X$. Define sheaf morphisms
\begin{align*}
\iota:\mathbb{Z} &\longrightarrow \mathcal{O} \\
n &\longmapsto (x\longmapsto n)
\end{align*}
and
\begin{align*}
\operatorname{Exp}:\mathcal{O} &\longrightarrow \mathcal{O}^* \\
f &\longmapsto (x\longmapsto \exp(2\pi i f(x))).
\end{align*}
The exponential sheaf sequence is exact:
\begin{align*}
0\longrightarrow \mathbb{Z}\xrightarrow{\iota}\mathcal{O}\xrightarrow{\operatorname{Exp}}\mathcal{O}^*\longrightarrow 1.
\end{align*}
Exactness at $\mathcal{O}^*$ uses the local existence of holomorphic logarithms for nowhere-vanishing holomorphic functions.
Applying the long exact cohomology sequence gives
\begin{align*}
\cdots \longrightarrow H^1(X,\mathcal{O})
\xrightarrow{\operatorname{Exp}_1}
H^1(X,\mathcal{O}^*)
\xrightarrow{\delta_X}
H^2(X,\mathbb{Z})
\xrightarrow{\iota_2}
H^2(X,\mathcal{O})
\longrightarrow \cdots ,
\end{align*}
where $\operatorname{Exp}_1$ is induced by $\operatorname{Exp}$, $\delta_X$ is the connecting homomorphism, and $\iota_2$ is induced by $\iota$. Exactness at $H^1(X,\mathcal{O}^*)$ gives
\begin{align*}
\ker(\delta_X)=\operatorname{im}(\operatorname{Exp}_1).
\end{align*}
[guided]
The bridge from multiplicative Cousin data to additive and topological obstructions is the exponential sequence. Let $\mathbb{Z}$ be the constant sheaf of locally constant integer-valued functions. We define
\begin{align*}
\iota:\mathbb{Z} &\longrightarrow \mathcal{O} \\ n &\longmapsto (x\longmapsto n)
\end{align*}
and
\begin{align*}
\operatorname{Exp}:\mathcal{O} &\longrightarrow \mathcal{O}^* \\ f &\longmapsto (x\longmapsto \exp(2\pi i f(x))).
\end{align*}
The kernel of $\operatorname{Exp}$ consists exactly of locally constant integer-valued holomorphic functions, because $\exp(2\pi i f)=1$ precisely when $f$ takes values in $\mathbb{Z}$, and a holomorphic function with values in the discrete set $\mathbb{Z}$ is locally constant. The map $\operatorname{Exp}$ is locally surjective because every nowhere-vanishing holomorphic function has a holomorphic logarithm after restricting to sufficiently small open subsets. Hence the exponential sheaf sequence is exact:
\begin{align*}
0\longrightarrow \mathbb{Z}\xrightarrow{\iota}\mathcal{O}\xrightarrow{\operatorname{Exp}}\mathcal{O}^*\longrightarrow 1.
\end{align*}
Applying the long exact cohomology sequence to this short exact sequence gives
\begin{align*}
\cdots \longrightarrow H^1(X,\mathcal{O}) \xrightarrow{\operatorname{Exp}_1} H^1(X,\mathcal{O}^*) \xrightarrow{\delta_X} H^2(X,\mathbb{Z}) \xrightarrow{\iota_2} H^2(X,\mathcal{O}) \longrightarrow \cdots .
\end{align*}
Here $\operatorname{Exp}_1$ is the map induced on first cohomology by $\operatorname{Exp}$, $\delta_X$ is the connecting homomorphism, and $\iota_2$ is induced on second cohomology by $\iota$. The exactness statement at the middle term is
\begin{align*}
\ker(\delta_X)=\operatorname{im}(\operatorname{Exp}_1).
\end{align*}
This equality is the algebraic form of the obstruction theory: classes in $H^1(X,\mathcal{O}^*)$ with zero boundary are precisely those coming from additive cohomology.
[/guided]
[/step]
[step:Identify the connecting homomorphism with the first Chern class]
Let $L\to X$ be a holomorphic line bundle. Choose an open cover $\mathfrak{U}=\{U_i\}_{i\in I}$ and nowhere-zero holomorphic frames
\begin{align*}
s_i:U_i &\longrightarrow L|_{U_i}.
\end{align*}
Define the transition maps
\begin{align*}
g_{ij}:U_i\cap U_j &\longrightarrow \mathbb{C}^*
\end{align*}
by
\begin{align*}
s_j(x)=g_{ij}(x)s_i(x).
\end{align*}
Then $(g_{ij})$ represents the class $[L]\in H^1(X,\mathcal{O}^*)$.
After refining the cover if necessary, choose holomorphic maps
\begin{align*}
\ell_{ij}:U_i\cap U_j &\longrightarrow \mathbb{C}
\end{align*}
such that
\begin{align*}
\exp(2\pi i\ell_{ij}(x))=g_{ij}(x).
\end{align*}
On triple overlaps define
\begin{align*}
n_{ijk}:U_i\cap U_j\cap U_k &\longrightarrow \mathbb{Z} \\
x &\longmapsto \ell_{ij}(x)+\ell_{jk}(x)+\ell_{ki}(x).
\end{align*}
Since $g_{ij}g_{jk}g_{ki}=1$, the function $n_{ijk}$ is integer-valued and locally constant. The Čech $2$-cocycle $(n_{ijk})$ represents $\delta_X([L])$. By the Čech definition of the first Chern class of a holomorphic line bundle, the same cocycle represents $c_1(L)$. Hence
\begin{align*}
\delta_X([L])=c_1(L)\in H^2(X,\mathbb{Z}).
\end{align*}
[guided]
We now identify the connecting homomorphism $\delta_X$ concretely. Let $L\to X$ be a holomorphic line bundle. Choose an open cover $\mathfrak{U}=\{U_i\}_{i\in I}$ over which $L$ is straightforward, and choose a nowhere-zero holomorphic frame
\begin{align*}
s_i:U_i &\longrightarrow L|_{U_i}
\end{align*}
on each $U_i$. On an overlap $U_i\cap U_j$, the two frames differ by a unique holomorphic nowhere-zero function. Thus we define
\begin{align*}
g_{ij}:U_i\cap U_j &\longrightarrow \mathbb{C}^*
\end{align*}
by
\begin{align*}
s_j(x)=g_{ij}(x)s_i(x).
\end{align*}
The associativity of changing frames gives $g_{ij}g_{jk}g_{ki}=1$ on $U_i\cap U_j\cap U_k$, so $(g_{ij})$ is an $\mathcal{O}^*$-valued Čech $1$-cocycle representing the class $[L]\in H^1(X,\mathcal{O}^*)$.
To compute the connecting homomorphism, lift the multiplicative cocycle locally through the exponential map. After refining the cover if necessary, the local holomorphic logarithm theorem gives holomorphic maps
\begin{align*}
\ell_{ij}:U_i\cap U_j &\longrightarrow \mathbb{C}
\end{align*}
such that
\begin{align*}
\exp(2\pi i\ell_{ij}(x))=g_{ij}(x).
\end{align*}
The lifted functions need not satisfy the additive cocycle condition. Their failure to do so is measured on triple overlaps by
\begin{align*}
n_{ijk}:U_i\cap U_j\cap U_k &\longrightarrow \mathbb{Z} \\ x &\longmapsto \ell_{ij}(x)+\ell_{jk}(x)+\ell_{ki}(x).
\end{align*}
Indeed,
\begin{align*}
\exp(2\pi i n_{ijk}(x)) &=\exp(2\pi i\ell_{ij}(x))\exp(2\pi i\ell_{jk}(x))\exp(2\pi i\ell_{ki}(x))\\ &=g_{ij}(x)g_{jk}(x)g_{ki}(x)\\ &=1,
\end{align*}
so $n_{ijk}(x)\in\mathbb{Z}$. Since $n_{ijk}$ is holomorphic as a complex-valued function and takes values in the discrete set $\mathbb{Z}$, it is locally constant. Therefore $(n_{ijk})$ is a $\mathbb{Z}$-valued Čech $2$-cocycle.
By the construction of the connecting homomorphism for the exponential sequence, the cohomology class of $(n_{ijk})$ is exactly $\delta_X([L])$. By the Čech definition of the first Chern class, this same class is $c_1(L)$. Therefore
\begin{align*}
\delta_X([L])=c_1(L)\in H^2(X,\mathbb{Z}).
\end{align*}
[/guided]
[/step]
[step:Use vanishing of $H^1(X,\mathcal{O})$ to straightforwardise line bundles with zero Chern class]
Assume $H^1(X,\mathcal{O})=0$. Then the induced map
\begin{align*}
\operatorname{Exp}_1:H^1(X,\mathcal{O}) &\longrightarrow H^1(X,\mathcal{O}^*)
\end{align*}
has zero image. Since
\begin{align*}
\ker(\delta_X)=\operatorname{im}(\operatorname{Exp}_1),
\end{align*}
the map
\begin{align*}
\delta_X:H^1(X,\mathcal{O}^*) &\longrightarrow H^2(X,\mathbb{Z})
\end{align*}
is injective.
Let $L\to X$ be a holomorphic line bundle with $c_1(L)=0$. By the previous step, $\delta_X([L])=c_1(L)=0$. Injectivity of $\delta_X$ gives $[L]=0$ in $H^1(X,\mathcal{O}^*)$. By the classification of holomorphic line bundles by $H^1(X,\mathcal{O}^*)$, $L$ is holomorphically straightforward.
[guided]
Assume now that $H^1(X,\mathcal{O})=0$. We want to show that a holomorphic line bundle with zero Chern class has no remaining holomorphic obstruction to straightforwardity.
From exactness of the long exact sequence at $H^1(X,\mathcal{O}^*)$, we have
\begin{align*}
\ker(\delta_X)=\operatorname{im}(\operatorname{Exp}_1),
\end{align*}
where
\begin{align*}
\operatorname{Exp}_1:H^1(X,\mathcal{O}) &\longrightarrow H^1(X,\mathcal{O}^*)
\end{align*}
is induced by the exponential sheaf morphism. Since the domain $H^1(X,\mathcal{O})$ is the zero group, its image is also the zero subgroup:
\begin{align*}
\operatorname{im}(\operatorname{Exp}_1)=0.
\end{align*}
Therefore
\begin{align*}
\ker(\delta_X)=0,
\end{align*}
which means that
\begin{align*}
\delta_X:H^1(X,\mathcal{O}^*) &\longrightarrow H^2(X,\mathbb{Z})
\end{align*}
is injective.
Now let $L\to X$ be a holomorphic line bundle whose first Chern class vanishes:
\begin{align*}
c_1(L)=0\in H^2(X,\mathbb{Z}).
\end{align*}
The previous step identified the connecting homomorphism with the first Chern class, so
\begin{align*}
\delta_X([L])=c_1(L)=0.
\end{align*}
Because $\delta_X$ is injective, the equality $\delta_X([L])=0$ forces
\begin{align*}
[L]=0\in H^1(X,\mathcal{O}^*).
\end{align*}
Finally, by the classification of holomorphic line bundles by $H^1(X,\mathcal{O}^*)$, the zero class is represented precisely by the holomorphically straightforward line bundle. Hence $L$ admits a holomorphic product decomposition.
[/guided]
[/step]
[step:Use vanishing of $H^2(X,\mathbb{Z})$ to force every Cousin II class to vanish]
Assume $H^1(X,\mathcal{O})=0$ and $H^2(X,\mathbb{Z})=0$. By the previous step, the map
\begin{align*}
\delta_X:H^1(X,\mathcal{O}^*) &\longrightarrow H^2(X,\mathbb{Z})
\end{align*}
is injective. Since its codomain is the zero group, its domain must also be the zero group:
\begin{align*}
H^1(X,\mathcal{O}^*)=0.
\end{align*}
By the first step, this is equivalent to solvability of every Cousin II datum on $X$. This proves the stated obstruction criterion: $H^1(X,\mathcal{O})$ accounts for the additive ambiguity in the exponential sequence, while $H^2(X,\mathbb{Z})$ is the group in which the topological Chern class obstruction lives.
[/step]