[proofplan]
We pass from Betti cohomology to complex de Rham cohomology and choose an auxiliary Hermitian metric on the compact Riemann surface $X_0(N)$. The [Hodge theorem](/theorems/3942) gives each cohomology class a unique harmonic representative. On a compact Riemann surface, harmonic complex-valued $1$-forms split uniquely into their $(1,0)$ and $(0,1)$ parts, which are respectively holomorphic differentials and conjugates of holomorphic differentials. Finally, the standard identification between weight $2$ cusp forms and holomorphic differentials on $X_0(N)$ transports this decomposition to the stated modular-form decomposition.
[/proofplan]
[step:Pass from Betti cohomology to harmonic complex-valued $1$-forms]
Let $X := X_0(N)$, regarded as a compact Riemann surface. Let $H^1_{\mathrm{dR}}(X;\mathbb{C})$ denote the first cohomology group of the complex of smooth complex-valued differential forms on $X$, namely closed smooth complex-valued $1$-forms modulo exact smooth complex-valued $1$-forms. By the de Rham comparison isomorphism for compact smooth manifolds, there is a natural complex-linear isomorphism
\begin{align*}
\Phi_{\mathrm{dR}}: H^1_B(X,\mathbb{C}) &\longrightarrow H^1_{\mathrm{dR}}(X;\mathbb{C}).
\end{align*}
Choose a Hermitian metric $h$ on $X$. Let $\mathcal{A}^1(X;\mathbb{C})$ denote the complex [vector space](/page/Vector%20Space) of smooth complex-valued $1$-forms on $X$, and let
\begin{align*}
\mathcal{H}^1_h(X;\mathbb{C})
:=
\{\alpha \in \mathcal{A}^1(X;\mathbb{C}) : d\alpha = 0 \text{ and } d_h^*\alpha = 0\}
\end{align*}
denote the space of $h$-harmonic complex-valued $1$-forms, where $d_h^*$ is the codifferential determined by $h$.
The Hermitian metric $h$ determines a smooth Riemannian metric on the underlying compact smooth surface $X$. The Hodge theorem for compact Riemannian manifolds applies to real-valued forms for this metric, and complexifying the real harmonic representative isomorphism gives that the map
\begin{align*}
\mathcal{H}^1_h(X;\mathbb{C}) &\longrightarrow H^1_{\mathrm{dR}}(X;\mathbb{C}) \\
\alpha &\longmapsto [\alpha]
\end{align*}
is a complex-linear isomorphism. Hence every class in $H^1_B(X,\mathbb{C})$ has a unique harmonic representative after applying $\Phi_{\mathrm{dR}}$.
[guided]
We first replace Betti cohomology by de Rham cohomology, because differential forms are the objects that carry the [Hodge decomposition](/theorems/2745). Let $X := X_0(N)$ be the compact Riemann surface in the statement. Let $H^1_{\mathrm{dR}}(X;\mathbb{C})$ denote the first cohomology group of the complex of smooth complex-valued differential forms on $X$, that is, closed smooth complex-valued $1$-forms modulo exact smooth complex-valued $1$-forms. The de Rham comparison theorem for compact smooth manifolds gives a natural complex-linear isomorphism
\begin{align*}
\Phi_{\mathrm{dR}}: H^1_B(X,\mathbb{C}) &\longrightarrow H^1_{\mathrm{dR}}(X;\mathbb{C}).
\end{align*}
This is the bridge between topological cohomology and differential forms.
Now choose a Hermitian metric $h$ on $X$. Let $\mathcal{A}^1(X;\mathbb{C})$ be the complex vector space of smooth complex-valued $1$-forms on $X$. The metric $h$ defines a codifferential $d_h^*$, and we define
\begin{align*}
\mathcal{H}^1_h(X;\mathbb{C})
:=
\{\alpha \in \mathcal{A}^1(X;\mathbb{C}) : d\alpha = 0 \text{ and } d_h^*\alpha = 0\}.
\end{align*}
The Hermitian metric $h$ determines a smooth Riemannian metric on the underlying smooth surface $X$. Since $X$ is compact, the Hodge theorem for compact Riemannian manifolds applies to real-valued differential forms for this metric. Complex-valued forms are obtained by complexifying the real de Rham complex and the real harmonic representative isomorphism, so each complex de Rham cohomology class has a unique complex-valued harmonic representative. Therefore the map
\begin{align*}
\mathcal{H}^1_h(X;\mathbb{C}) &\longrightarrow H^1_{\mathrm{dR}}(X;\mathbb{C}) \\
\alpha &\longmapsto [\alpha]
\end{align*}
is an isomorphism. Thus proving the desired decomposition of $H^1_B(X,\mathbb{C})$ is equivalent to decomposing the harmonic complex-valued $1$-forms on $X$.
[/guided]
[/step]
[step:Split harmonic $1$-forms into holomorphic and anti-holomorphic parts]
Let $\mathcal{A}^{1,0}(X)$ denote the complex vector space of smooth $(1,0)$-forms on $X$, and let $\mathcal{A}^{0,1}(X)$ denote the complex vector space of smooth $(0,1)$-forms on $X$. Define the type components of the [exterior derivative](/theorems/1525)
\begin{align*}
\partial: \mathcal{A}^{p,q}(X) &\to \mathcal{A}^{p+1,q}(X), \\
\bar{\partial}: \mathcal{A}^{p,q}(X) &\to \mathcal{A}^{p,q+1}(X)
\end{align*}
by decomposing $d\beta = \partial\beta + \bar{\partial}\beta$ for each smooth $(p,q)$-form $\beta \in \mathcal{A}^{p,q}(X)$. Let
\begin{align*}
*_h: \mathcal{A}^1(X;\mathbb{C}) &\to \mathcal{A}^1(X;\mathbb{C})
\end{align*}
denote the Hodge star operator determined by the Hermitian metric $h$, and recall that on $1$-forms the codifferential is $d_h^* = -*_h d *_h$.
Every $\alpha \in \mathcal{A}^1(X;\mathbb{C})$ has a unique type decomposition
\begin{align*}
\alpha = \alpha^{1,0} + \alpha^{0,1},
\end{align*}
with $\alpha^{1,0} \in \mathcal{A}^{1,0}(X)$ and $\alpha^{0,1} \in \mathcal{A}^{0,1}(X)$.
Suppose $\alpha \in \mathcal{H}^1_h(X;\mathbb{C})$. Set
\begin{align*}
A := \bar{\partial}\alpha^{1,0} \in \mathcal{A}^{1,1}(X),
\qquad
B := \partial\alpha^{0,1} \in \mathcal{A}^{1,1}(X).
\end{align*}
Since the $(2,0)$ and $(0,2)$ components vanish identically in complex dimension $1$, decomposing $d\alpha=0$ by type gives
\begin{align*}
A + B = 0.
\end{align*}
The co-closed condition also gives $d(*_h\alpha)=0$, because $d_h^*\alpha=-*_h d *_h\alpha=0$ and $*_h$ is an isomorphism on $1$-forms. Since $*_h$ acts by $-i$ on $(1,0)$-forms and by $i$ on $(0,1)$-forms, we have
\begin{align*}
*_h\alpha = -i\alpha^{1,0} + i\alpha^{0,1}.
\end{align*}
Again using the vanishing of types $(2,0)$ and $(0,2)$ on a Riemann surface, the equation $d(*_h\alpha)=0$ becomes
\begin{align*}
-iA + iB = 0.
\end{align*}
The two equations $A+B=0$ and $-iA+iB=0$ imply $A=0$ and $B=0$. Hence $\bar{\partial}\alpha^{1,0}=0$, so $\alpha^{1,0}$ is a holomorphic differential, and $\partial\alpha^{0,1}=0$, so $\alpha^{0,1}$ is the complex conjugate of a holomorphic differential.
Conversely, if $\omega \in H^0(X,\Omega^1)$, then $\omega$ is a smooth $(1,0)$-form satisfying $\bar{\partial}\omega = 0$. Since $\partial\omega$ has type $(2,0)$ and $X$ has complex dimension $1$, $\partial\omega = 0$, so $d\omega = 0$. The Hodge star operator satisfies $*_h\omega = -i\omega$ on $(1,0)$-forms, hence
\begin{align*}
d(*_h\omega) = -i\,d\omega = 0.
\end{align*}
Using $d_h^* = -*_h d *_h$ on $1$-forms, we obtain $d_h^*\omega = 0$. Thus $d\omega = 0$ and $d_h^*\omega = 0$, so $\omega$ is harmonic. The same argument applied to $\overline{\omega}$ gives that every element of $\overline{H^0(X,\Omega^1)}$ is harmonic. The sum is direct because a form of type $(1,0)$ and a form of type $(0,1)$ can be equal only if both forms are zero. Hence
\begin{align*}
\mathcal{H}^1_h(X;\mathbb{C})
=
H^0(X,\Omega^1)
\oplus
\overline{H^0(X,\Omega^1)}.
\end{align*}
[guided]
The complex structure on $X$ decomposes complex-valued $1$-forms by type. Let $\mathcal{A}^{1,0}(X)$ be the smooth $(1,0)$-forms and let $\mathcal{A}^{0,1}(X)$ be the smooth $(0,1)$-forms. For smooth $(p,q)$-forms, define the operators
\begin{align*}
\partial: \mathcal{A}^{p,q}(X) &\to \mathcal{A}^{p+1,q}(X), \\
\bar{\partial}: \mathcal{A}^{p,q}(X) &\to \mathcal{A}^{p,q+1}(X)
\end{align*}
by the type decomposition $d\beta = \partial\beta + \bar{\partial}\beta$ for each $\beta \in \mathcal{A}^{p,q}(X)$. Let
\begin{align*}
*_h: \mathcal{A}^1(X;\mathbb{C}) &\to \mathcal{A}^1(X;\mathbb{C})
\end{align*}
be the Hodge star operator determined by $h$; on $1$-forms the corresponding codifferential is $d_h^* = -*_h d *_h$.
For every smooth complex-valued $1$-form $\alpha \in \mathcal{A}^1(X;\mathbb{C})$, there are unique forms $\alpha^{1,0} \in \mathcal{A}^{1,0}(X)$ and $\alpha^{0,1} \in \mathcal{A}^{0,1}(X)$ such that
\begin{align*}
\alpha = \alpha^{1,0} + \alpha^{0,1}.
\end{align*}
Now assume $\alpha$ is harmonic. In particular, $d\alpha = 0$ and $d_h^*\alpha=0$. Define the two $(1,1)$-forms
\begin{align*}
A := \bar{\partial}\alpha^{1,0} \in \mathcal{A}^{1,1}(X),
\qquad
B := \partial\alpha^{0,1} \in \mathcal{A}^{1,1}(X).
\end{align*}
Since $X$ has complex dimension $1$, there are no nonzero smooth forms of type $(2,0)$ or $(0,2)$. Thus
\begin{align*}
\partial\alpha^{1,0}=0,
\qquad
\bar{\partial}\alpha^{0,1}=0.
\end{align*}
Decomposing $d\alpha=0$ by type therefore gives
\begin{align*}
0=d\alpha=A+B.
\end{align*}
This equation alone is not enough to force $A$ and $B$ to vanish separately, because both have type $(1,1)$. The missing information is the co-closed condition. Since $d_h^*\alpha=-*_h d *_h\alpha=0$ and $*_h$ is an isomorphism on $1$-forms, we obtain
\begin{align*}
d(*_h\alpha)=0.
\end{align*}
The Hodge star satisfies $*_h\alpha^{1,0}=-i\alpha^{1,0}$ and $*_h\alpha^{0,1}=i\alpha^{0,1}$, so
\begin{align*}
*_h\alpha=-i\alpha^{1,0}+i\alpha^{0,1}.
\end{align*}
Using again that the $(2,0)$ and $(0,2)$ terms vanish in complex dimension $1$, the equation $d(*_h\alpha)=0$ becomes
\begin{align*}
0=d(*_h\alpha)=-iA+iB.
\end{align*}
The system
\begin{align*}
A+B=0,
\qquad
-iA+iB=0
\end{align*}
implies $A=0$ and $B=0$. Hence
\begin{align*}
\bar{\partial}\alpha^{1,0}=0,
\qquad
\partial\alpha^{0,1}=0.
\end{align*}
The first equation says exactly that $\alpha^{1,0}$ is a holomorphic differential. The second says that $\alpha^{0,1}$ is anti-holomorphic, equivalently that $\alpha^{0,1} = \overline{\omega}$ for a unique holomorphic differential $\omega \in H^0(X,\Omega^1)$.
Conversely, let $\omega \in H^0(X,\Omega^1)$. Then $\omega$ is a smooth $(1,0)$-form satisfying $\bar{\partial}\omega = 0$. Since $X$ has complex dimension $1$, the form $\partial\omega$ has type $(2,0)$ and must vanish. Hence
\begin{align*}
d\omega = \partial\omega + \bar{\partial}\omega = 0.
\end{align*}
For a Hermitian metric on a Riemann surface, the Hodge star acts on $(1,0)$-forms by $*_h\omega = -i\omega$. Therefore
\begin{align*}
d(*_h\omega) = d(-i\omega) = -i\,d\omega = 0.
\end{align*}
The codifferential on $1$-forms is $d_h^* = -*_h d *_h$, so the last equality gives
\begin{align*}
d_h^*\omega = -*_h d(*_h\omega) = 0.
\end{align*}
Together with $d\omega = 0$, this proves that $\omega$ is harmonic. Complex conjugation gives the same conclusion for every $\overline{\omega} \in \overline{H^0(X,\Omega^1)}$. This proves
\begin{align*}
\mathcal{H}^1_h(X;\mathbb{C})
=
H^0(X,\Omega^1)
\oplus
\overline{H^0(X,\Omega^1)}.
\end{align*}
The sum is direct because a form of type $(1,0)$ and a form of type $(0,1)$ can be equal only if both are zero.
[/guided]
[/step]
[step:Transport the harmonic decomposition back to Betti cohomology]
Composing the de Rham comparison isomorphism with the harmonic representative isomorphism gives
\begin{align*}
H^1_B(X,\mathbb{C})
\cong
\mathcal{H}^1_h(X;\mathbb{C})
=
H^0(X,\Omega^1)
\oplus
\overline{H^0(X,\Omega^1)}.
\end{align*}
The resulting subspaces are independent of the auxiliary metric $h$, because they are exactly the cohomology classes represented by holomorphic and anti-holomorphic differentials, which are defined by the complex structure of $X$ alone. Hence the decomposition is canonical.
Finally, by the standard identification of weight $2$ cusp forms with holomorphic differentials on the compact modular curve, the map
\begin{align*}
S_2(\Gamma_0(N)) &\longrightarrow H^0(X,\Omega^1) \\
f &\longmapsto f(z)\,dz
\end{align*}
is a complex-linear isomorphism. Taking complex conjugates gives an isomorphism
\begin{align*}
\overline{S_2(\Gamma_0(N))}
&\longrightarrow
\overline{H^0(X,\Omega^1)}.
\end{align*}
Substituting these two isomorphisms into the [Hodge decomposition](/theorems/3941) yields
\begin{align*}
H^1_B(X_0(N),\mathbb{C})
\cong
S_2(\Gamma_0(N))
\oplus
\overline{S_2(\Gamma_0(N))}.
\end{align*}
This is the desired decomposition.
[/step]