[proofplan]
We attach to a point $z \in \mathbb{H}$ the elliptic curve $E_z = \mathbb{C}/(\mathbb{Z}z+\mathbb{Z})$ together with the cyclic subgroup generated by the class of $1/N$. The first task is to check that this construction is invariant under the action of $\Gamma_0(N)$, so it descends to a map from $\Gamma_0(N)\backslash \mathbb{H}$. Conversely, starting from a pair $(E,C)$, we choose an oriented basis of the period lattice adapted to the cyclic subgroup $C$ and recover a point $z \in \mathbb{H}$. The adapted-basis ambiguity is exactly the action of $\Gamma_0(N)$, which gives both well-definedness and bijectivity.
[/proofplan]
[step:Attach a cyclic level subgroup to each point of the upper half-plane]
For $z \in \mathbb{H}$, define the lattice
\begin{align*}
\Lambda_z := \mathbb{Z}z+\mathbb{Z} \subset \mathbb{C}
\end{align*}
and the complex elliptic curve
\begin{align*}
E_z := \mathbb{C}/\Lambda_z.
\end{align*}
Let
\begin{align*}
\pi_z: \mathbb{C} &\to E_z \\
w &\mapsto w+\Lambda_z
\end{align*}
denote the quotient map. Define
\begin{align*}
C_z := \langle \pi_z(1/N)\rangle \le E_z.
\end{align*}
Since $N\pi_z(1/N)=\pi_z(1)=0$ and no smaller positive integer $m<N$ satisfies $m/N \in \Lambda_z$, the element $\pi_z(1/N)$ has exact order $N$. Hence $C_z$ is a cyclic subgroup of $E_z[N]$ of order $N$.
[guided]
Fix $z \in \mathbb{H}$. The analytic uniformisation of the elliptic curve attached to $z$ uses the lattice
\begin{align*}
\Lambda_z := \mathbb{Z}z+\mathbb{Z} \subset \mathbb{C}.
\end{align*}
Because $\operatorname{Im}(z)>0$, the two complex numbers $z$ and $1$ are linearly independent over $\mathbb{R}$, so $\Lambda_z$ is a rank-two lattice in $\mathbb{C}$. We define
\begin{align*}
E_z := \mathbb{C}/\Lambda_z
\end{align*}
and let
\begin{align*}
\pi_z: \mathbb{C} &\to E_z \\
w &\mapsto w+\Lambda_z
\end{align*}
be the quotient homomorphism.
The desired level structure should be a cyclic subgroup of order $N$. The standard choice is the subgroup generated by the class of $1/N$:
\begin{align*}
C_z := \langle \pi_z(1/N)\rangle \le E_z.
\end{align*}
We verify its order. First,
\begin{align*}
N\pi_z(1/N)=\pi_z(1)=0
\end{align*}
because $1 \in \Lambda_z$. If $1 \le m < N$, then $m\pi_z(1/N)=0$ would mean $m/N \in \Lambda_z$. Since $m/N$ is real, an equality
\begin{align*}
m/N = a z + b
\end{align*}
with $a,b \in \mathbb{Z}$ forces $a=0$ by comparing imaginary parts. Then $m/N=b \in \mathbb{Z}$, which is impossible for $1 \le m < N$. Thus $\pi_z(1/N)$ has exact order $N$, and $C_z$ is a cyclic subgroup of $E_z[N]$ of order $N$.
[/guided]
[/step]
[step:Check invariance under the action of $\Gamma_0(N)$]
Let
\begin{align*}
\gamma :=
\begin{pmatrix}
a & b \\
c & d
\end{pmatrix}
\in \Gamma_0(N)
\end{align*}
and set $z' := \gamma z = \frac{az+b}{cz+d}$. Multiplication by $cz+d$ gives a complex-[linear map](/page/Linear%20Map)
\begin{align*}
m_\gamma: \mathbb{C} &\to \mathbb{C} \\
w &\mapsto (cz+d)w.
\end{align*}
It carries $\Lambda_{z'}$ onto $\Lambda_z$, since
\begin{align*}
(cz+d)z' &= az+b,\\
(cz+d) &= cz+d.
\end{align*}
Therefore $m_\gamma$ induces an isomorphism of complex elliptic curves
\begin{align*}
\bar m_\gamma: E_{z'} &\to E_z \\
w+\Lambda_{z'} &\mapsto (cz+d)w+\Lambda_z.
\end{align*}
Since $c \equiv 0 \pmod N$, write $c=Nr$ with $r \in \mathbb{Z}$. Then
\begin{align*}
\bar m_\gamma(\pi_{z'}(1/N))
= \pi_z((cz+d)/N)
= \pi_z(rz+d/N)
= d\,\pi_z(1/N).
\end{align*}
The congruence condition $c \equiv 0 \pmod N$ and the identity $ad-bc=1$ imply $\gcd(d,N)=1$. Hence multiplication by $d$ permutes the cyclic group $C_z$, and $\bar m_\gamma(C_{z'})=C_z$. Thus $(E_{z'},C_{z'}) \cong (E_z,C_z)$.
[guided]
We must show that the pair constructed from $z$ depends only on the $\Gamma_0(N)$-orbit of $z$. Let
\begin{align*}
\gamma :=
\begin{pmatrix}
a & b \\
c & d
\end{pmatrix}
\in \Gamma_0(N),
\qquad
z' := \gamma z = \frac{az+b}{cz+d}.
\end{align*}
The standard relation between the two lattices is given by multiplication by $cz+d$. Define
\begin{align*}
m_\gamma: \mathbb{C} &\to \mathbb{C} \\
w &\mapsto (cz+d)w.
\end{align*}
We verify that $m_\gamma(\Lambda_{z'})=\Lambda_z$. The lattice $\Lambda_{z'}$ is generated by $z'$ and $1$, and
\begin{align*}
(cz+d)z' &= az+b \in \Lambda_z,\\
(cz+d)\cdot 1 &= cz+d \in \Lambda_z.
\end{align*}
Thus $m_\gamma(\Lambda_{z'}) \subseteq \Lambda_z$. Because $\gamma \in SL_2(\mathbb{Z})$, the integer matrix
\begin{align*}
\begin{pmatrix}
a & c \\
b & d
\end{pmatrix}
\end{align*}
has determinant $ad-bc=1$, so the two elements $az+b$ and $cz+d$ form another $\mathbb{Z}$-basis of $\Lambda_z$. Hence $m_\gamma(\Lambda_{z'})=\Lambda_z$.
Therefore $m_\gamma$ descends to an isomorphism
\begin{align*}
\bar m_\gamma: E_{z'} &\to E_z \\
w+\Lambda_{z'} &\mapsto (cz+d)w+\Lambda_z.
\end{align*}
We now check that this isomorphism respects the cyclic subgroup. Since $\gamma \in \Gamma_0(N)$, there is $r \in \mathbb{Z}$ with $c=Nr$. Then
\begin{align*}
\bar m_\gamma(\pi_{z'}(1/N))
&= \pi_z((cz+d)/N)\\
&= \pi_z(rz+d/N)\\
&= d\,\pi_z(1/N),
\end{align*}
because $rz \in \Lambda_z$. Finally, $ad-bc=1$ and $N \mid c$ imply $ad \equiv 1 \pmod N$, so $d$ is invertible modulo $N$. Multiplication by $d$ therefore sends the cyclic group generated by $\pi_z(1/N)$ onto itself. Hence $\bar m_\gamma(C_{z'})=C_z$, proving that the construction is constant on $\Gamma_0(N)$-orbits.
[/guided]
[/step]
[step:Descend the construction to a map from $Y_0(N)(\mathbb{C})$]
By the preceding step, the assignment
\begin{align*}
z \mapsto [(E_z,C_z)]
\end{align*}
is constant on $\Gamma_0(N)$-orbits. Hence it defines a map
\begin{align*}
\Phi: \Gamma_0(N)\backslash \mathbb{H} &\to \{ \text{isomorphism classes of pairs }(E,C)\} \\
\Gamma_0(N)z &\mapsto [(E_z,C_z)].
\end{align*}
Under the analytic identification $Y_0(N)(\mathbb{C}) \cong \Gamma_0(N)\backslash \mathbb{H}$, this is the required candidate moduli map.
[/step]
[step:Put an arbitrary cyclic subgroup into standard position]
Let $(E,C)$ be a pair as in the statement. Choose a lattice $\Lambda \subset \mathbb{C}$ and an isomorphism of complex elliptic curves
\begin{align*}
\alpha: \mathbb{C}/\Lambda &\to E.
\end{align*}
Let
\begin{align*}
\pi_\Lambda: \mathbb{C} &\to \mathbb{C}/\Lambda \\
w &\mapsto w+\Lambda
\end{align*}
be the quotient map, and define
\begin{align*}
\widetilde C := \alpha^{-1}(C) \le \mathbb{C}/\Lambda.
\end{align*}
Since $\widetilde C$ is cyclic of order $N$, the preimage
\begin{align*}
\Lambda' := \pi_\Lambda^{-1}(\widetilde C)
\end{align*}
is a lattice containing $\Lambda$ with quotient $\Lambda'/\Lambda \cong \widetilde C \cong \mathbb{Z}/N\mathbb{Z}$.
By the classification of sublattices of a rank-two free abelian group with cyclic quotient, there is an oriented $\mathbb{Z}$-basis $(\omega_1,\omega_2)$ of $\Lambda$ such that
\begin{align*}
\Lambda' = \mathbb{Z}(\omega_1/N)+\mathbb{Z}\omega_2.
\end{align*}
Replacing $(\omega_1,\omega_2)$ by $(-\omega_1,-\omega_2)$ if necessary, assume
\begin{align*}
z := \omega_2/\omega_1 \in \mathbb{H}.
\end{align*}
Multiplication by $\omega_1$ induces an isomorphism
\begin{align*}
\beta_z: E_z &\to \mathbb{C}/\Lambda \\
w+\Lambda_z &\mapsto \omega_1 w+\Lambda.
\end{align*}
Moreover,
\begin{align*}
\beta_z(C_z)
= \langle \pi_\Lambda(\omega_1/N)\rangle
= \Lambda'/\Lambda
= \widetilde C.
\end{align*}
Thus $(E,C)$ is isomorphic to $(E_z,C_z)$, so $\Phi$ is surjective.
[guided]
We now start with an arbitrary pair $(E,C)$ and show that it comes from some point of the upper half-plane. Choose a lattice $\Lambda \subset \mathbb{C}$ and an isomorphism
\begin{align*}
\alpha: \mathbb{C}/\Lambda &\to E.
\end{align*}
Let
\begin{align*}
\pi_\Lambda: \mathbb{C} &\to \mathbb{C}/\Lambda \\
w &\mapsto w+\Lambda
\end{align*}
be the quotient map. Pull the subgroup $C$ back to
\begin{align*}
\widetilde C := \alpha^{-1}(C) \le \mathbb{C}/\Lambda.
\end{align*}
This subgroup is again cyclic of order $N$.
The subgroup $\widetilde C$ can be encoded as a larger lattice. Define
\begin{align*}
\Lambda' := \pi_\Lambda^{-1}(\widetilde C).
\end{align*}
Then $\Lambda \subset \Lambda'$, and the quotient $\Lambda'/\Lambda$ is exactly $\widetilde C$. Hence
\begin{align*}
\Lambda'/\Lambda \cong \mathbb{Z}/N\mathbb{Z}.
\end{align*}
The classification of sublattices of a rank-two free abelian group with cyclic quotient says that there is an oriented basis $(\omega_1,\omega_2)$ of $\Lambda$ for which
\begin{align*}
\Lambda' = \mathbb{Z}(\omega_1/N)+\mathbb{Z}\omega_2.
\end{align*}
This is the algebraic meaning of putting the subgroup into standard position: the chosen generator of the cyclic quotient is represented by $\omega_1/N$.
The ratio $\omega_2/\omega_1$ lies either in $\mathbb{H}$ or in the lower half-plane, depending on the orientation convention. Replacing both basis vectors by their negatives does not change the lattice or the displayed formula for $\Lambda'$, and we choose the sign so that
\begin{align*}
z := \omega_2/\omega_1 \in \mathbb{H}.
\end{align*}
Then $\Lambda=\omega_1(\mathbb{Z}+\mathbb{Z}z)=\omega_1\Lambda_z$. Multiplication by $\omega_1$ therefore induces an isomorphism
\begin{align*}
\beta_z: E_z &\to \mathbb{C}/\Lambda \\
w+\Lambda_z &\mapsto \omega_1 w+\Lambda.
\end{align*}
It sends the standard cyclic subgroup to the pulled-back subgroup because
\begin{align*}
\beta_z(C_z)
= \langle \pi_\Lambda(\omega_1/N)\rangle
= \Lambda'/\Lambda
= \widetilde C.
\end{align*}
Composing $\beta_z$ with $\alpha$ gives an isomorphism $(E_z,C_z)\cong(E,C)$. Thus every pair occurs in the image of $\Phi$.
[/guided]
[/step]
[step:Show that two adapted bases differ by an element of $\Gamma_0(N)$]
Suppose $z,z' \in \mathbb{H}$ and $(E_z,C_z)\cong(E_{z'},C_{z'})$. Choose an isomorphism
\begin{align*}
f: E_z &\to E_{z'}
\end{align*}
with $f(C_z)=C_{z'}$. Any complex-linear isomorphism of complex tori lifts to multiplication by some $\lambda \in \mathbb{C}^{\times}$ satisfying
\begin{align*}
\lambda \Lambda_z=\Lambda_{z'}.
\end{align*}
Thus there exist integers $a,b,c,d \in \mathbb{Z}$ such that
\begin{align*}
\lambda z &= az'+b,\\
\lambda &= cz'+d.
\end{align*}
The induced matrix has determinant $ad-bc=1$ after choosing the orientation compatible with $z,z' \in \mathbb{H}$. Solving for $z'$ gives
\begin{align*}
z' = \frac{dz-b}{-cz+a}.
\end{align*}
The condition $f(C_z)=C_{z'}$ says that $\lambda/N+\Lambda_{z'}$ lies in the subgroup generated by $1/N+\Lambda_{z'}$. Hence there is $k \in \mathbb{Z}$ such that
\begin{align*}
\frac{\lambda}{N}-\frac{k}{N}\in \Lambda_{z'}.
\end{align*}
Using $\lambda=cz'+d$, this becomes
\begin{align*}
\frac{cz'+d-k}{N}\in \mathbb{Z}z'+\mathbb{Z}.
\end{align*}
Comparing coefficients in the $\mathbb{Z}$-basis $(z',1)$ of $\Lambda_{z'}$ gives $N \mid c$. Therefore the matrix
\begin{align*}
\begin{pmatrix}
d & -b \\
-c & a
\end{pmatrix}
\end{align*}
belongs to $\Gamma_0(N)$ and sends $z$ to $z'$. Thus $z$ and $z'$ define the same point of $\Gamma_0(N)\backslash \mathbb{H}$, so $\Phi$ is injective.
[guided]
It remains to prove that the only ambiguity in the construction is the action of $\Gamma_0(N)$. Suppose
\begin{align*}
f: E_z \to E_{z'}
\end{align*}
is an isomorphism of elliptic curves with $f(C_z)=C_{z'}$. A holomorphic group isomorphism between complex tori lifts to a complex-linear map of universal covers. Thus there exists $\lambda \in \mathbb{C}^{\times}$ such that multiplication by $\lambda$ maps $\Lambda_z$ isomorphically onto $\Lambda_{z'}$:
\begin{align*}
\lambda \Lambda_z=\Lambda_{z'}.
\end{align*}
Since $\Lambda_z$ has basis $(z,1)$ and $\Lambda_{z'}$ has basis $(z',1)$, there are integers $a,b,c,d \in \mathbb{Z}$ with
\begin{align*}
\lambda z &= az'+b,\\
\lambda &= cz'+d.
\end{align*}
The corresponding change-of-basis matrix has determinant $\pm 1$. Because both ordered bases define the positive orientation of the complex plane through points of $\mathbb{H}$, the determinant is $1$, so
\begin{align*}
ad-bc=1.
\end{align*}
Solving the two displayed equations for $z'$ gives
\begin{align*}
z'=\frac{dz-b}{-cz+a}.
\end{align*}
Thus $z'$ is obtained from $z$ by an element of $SL_2(\mathbb{Z})$; we still need to prove the extra congruence condition defining $\Gamma_0(N)$.
The congruence comes exactly from preservation of the subgroup. Since $f(C_z)=C_{z'}$, the image of the generator $1/N+\Lambda_z$ lies in $C_{z'}$. Under the lift, this image is
\begin{align*}
\lambda/N+\Lambda_{z'}.
\end{align*}
Therefore there is $k \in \mathbb{Z}$ such that
\begin{align*}
\frac{\lambda}{N}-\frac{k}{N}\in \Lambda_{z'}.
\end{align*}
Using $\lambda=cz'+d$, this becomes
\begin{align*}
\frac{cz'+d-k}{N}\in \mathbb{Z}z'+\mathbb{Z}.
\end{align*}
Because $(z',1)$ is a $\mathbb{Z}$-basis of $\Lambda_{z'}$, membership in $\Lambda_{z'}$ forces both coefficients to be integers. In particular,
\begin{align*}
c/N \in \mathbb{Z}.
\end{align*}
Hence $N \mid c$.
Consequently
\begin{align*}
\begin{pmatrix}
d & -b \\
-c & a
\end{pmatrix}
\in \Gamma_0(N),
\end{align*}
and the formula above says that this element sends $z$ to $z'$. Thus $z$ and $z'$ represent the same point of $\Gamma_0(N)\backslash\mathbb{H}$. This proves injectivity of $\Phi$.
[/guided]
[/step]
[step:Conclude the moduli interpretation]
The map
\begin{align*}
\Phi: \Gamma_0(N)\backslash \mathbb{H} \to \{ \text{isomorphism classes of pairs }(E,C)\}
\end{align*}
is well-defined by $\Gamma_0(N)$-invariance, surjective by adapted bases, and injective because two adapted bases differ by an element of $\Gamma_0(N)$. Therefore $\Phi$ is a bijection. Using the analytic identification $Y_0(N)(\mathbb{C}) \cong \Gamma_0(N)\backslash \mathbb{H}$ gives the claimed natural bijection between $Y_0(N)(\mathbb{C})$ and isomorphism classes of pairs $(E,C)$.
[/step]