[proofplan]
A weight $0$ modular form is invariant under the action of $SL_2(\mathbb Z)$ on the upper half-plane and is holomorphic at the cusp. Therefore it descends to a [holomorphic function](/page/Holomorphic%20Function) on the compactified modular curve $X(1)=SL_2(\mathbb Z)\backslash(\mathbb H\cup\{\infty\})$. Since every holomorphic function on a compact connected Riemann surface is constant, the descended function is constant, and hence the original modular form is constant. Finally, the cusp condition forces the constant term at the cusp to vanish, so the only weight $0$ cusp form is the zero function.
[/proofplan]
[step:Descend a weight $0$ modular form to the compactified modular curve]
Let
\begin{align*}
f:\mathbb H \to \mathbb C
\end{align*}
be a weight $0$ modular form for $SL_2(\mathbb Z)$, where $\mathbb H=\{z\in\mathbb C:\operatorname{Im}(z)>0\}$ is the complex upper half-plane. By the transformation law in weight $0$, for every matrix
\begin{align*}
\gamma=
\begin{pmatrix}
a & b\\
c & d
\end{pmatrix}
\in SL_2(\mathbb Z)
\end{align*}
and every $z\in\mathbb H$,
\begin{align*}
f\left(\frac{az+b}{cz+d}\right)=f(z).
\end{align*}
Thus $f$ is constant on each $SL_2(\mathbb Z)$-orbit in $\mathbb H$.
Let
\begin{align*}
X(1):=SL_2(\mathbb Z)\backslash(\mathbb H\cup\{\infty\})
\end{align*}
denote the compactified modular curve of level one, obtained by adding the cusp $\infty$ to the quotient. The holomorphy condition at the cusp means that $f$ has a holomorphic Fourier expansion in the local parameter
\begin{align*}
q:\mathbb H \to \mathbb C,\qquad z\mapsto e^{2\pi i z},
\end{align*}
of the form
\begin{align*}
f(z)=\sum_{n=0}^{\infty} a_n q(z)^n
\end{align*}
for $|q(z)|$ sufficiently small, with coefficients $a_n\in\mathbb C$.
Define
\begin{align*}
F:X(1)\to\mathbb C
\end{align*}
by
\begin{align*}
F([z])=f(z)\quad\text{for }z\in\mathbb H,
\qquad
F([\infty])=a_0.
\end{align*}
The preceding invariance shows that $F([z])$ is independent of the representative $z$ of the orbit. On the image of $\mathbb H$ in $X(1)$, the map $F$ is holomorphic because it is locally represented by the holomorphic function $f$. At the cusp, the expression
\begin{align*}
F(q)=\sum_{n=0}^{\infty} a_n q^n
\end{align*}
is holomorphic in the coordinate $q$ near $q=0$. Therefore $F$ is a holomorphic function on $X(1)$.
[guided]
Let us check carefully why the modular form gives a genuine function on the quotient. A weight $0$ modular form is a holomorphic map
\begin{align*}
f:\mathbb H\to\mathbb C
\end{align*}
satisfying
\begin{align*}
f(\gamma z)=f(z)
\end{align*}
for every $\gamma\in SL_2(\mathbb Z)$ and every $z\in\mathbb H$, where
\begin{align*}
\gamma z=\frac{az+b}{cz+d}
\end{align*}
for
\begin{align*}
\gamma=
\begin{pmatrix}
a & b\\
c & d
\end{pmatrix}.
\end{align*}
This is exactly the condition needed for $f$ to be constant on equivalence classes in the quotient $SL_2(\mathbb Z)\backslash\mathbb H$.
The only additional point is the cusp. Holomorphy at the cusp means that, in the local coordinate
\begin{align*}
q:\mathbb H\to\mathbb C,\qquad z\mapsto e^{2\pi i z},
\end{align*}
the function has a convergent [power series](/page/Power%20Series) expansion
\begin{align*}
f(z)=\sum_{n=0}^{\infty} a_n q(z)^n
\end{align*}
near $q=0$. This allows us to define the value at the added cusp by
\begin{align*}
F([\infty])=a_0.
\end{align*}
Thus the descended map
\begin{align*}
F:X(1)\to\mathbb C
\end{align*}
given by $F([z])=f(z)$ for $z\in\mathbb H$ and $F([\infty])=a_0$ is well-defined and holomorphic both away from the cusp and at the cusp.
[/guided]
[/step]
[step:Apply compactness of $X(1)$ to force the descended function to be constant]
The compactified quotient
\begin{align*}
X(1)=SL_2(\mathbb Z)\backslash(\mathbb H\cup\{\infty\})
\end{align*}
is a compact connected Riemann surface by the standard construction of the compactified modular curve of level one (citing a result not yet in the wiki: compactness and Riemann surface structure of $X(1)$).
Since
\begin{align*}
F:X(1)\to\mathbb C
\end{align*}
is holomorphic and $X(1)$ is compact and connected, the [maximum modulus principle](/page/Maximum%20Modulus%20Principle) for compact Riemann surfaces implies that $F$ is constant (citing a result not yet in the wiki: holomorphic functions on compact connected Riemann surfaces are constant). Hence there exists a complex number $c\in\mathbb C$ such that
\begin{align*}
F(P)=c
\end{align*}
for every point $P\in X(1)$. In particular, for every $z\in\mathbb H$,
\begin{align*}
f(z)=F([z])=c.
\end{align*}
Thus every element of $M_0(SL_2(\mathbb Z))$ is constant. Conversely, every constant function $\mathbb H\to\mathbb C$ is holomorphic, invariant under $SL_2(\mathbb Z)$, and holomorphic at the cusp. Therefore
\begin{align*}
M_0(SL_2(\mathbb Z))=\mathbb C.
\end{align*}
[guided]
The modular invariance has converted the original function on $\mathbb H$ into a holomorphic function
\begin{align*}
F:X(1)\to\mathbb C
\end{align*}
on the compactified modular curve. The key geometric input is that
\begin{align*}
X(1)=SL_2(\mathbb Z)\backslash(\mathbb H\cup\{\infty\})
\end{align*}
is a compact connected Riemann surface after the cusp is added (citing a result not yet in the wiki: compactness and Riemann surface structure of $X(1)$).
Now apply the [maximum modulus principle](/theorems/491) in the compact connected Riemann surface form: every holomorphic function from a compact connected Riemann surface to $\mathbb C$ is constant (citing a result not yet in the wiki: holomorphic functions on compact connected Riemann surfaces are constant). The hypotheses are satisfied because $F$ is holomorphic by the descent construction, $X(1)$ is compact, and $X(1)$ is connected. Therefore there exists $c\in\mathbb C$ such that
\begin{align*}
F(P)=c
\end{align*}
for all $P\in X(1)$.
Pulling this conclusion back along the quotient map gives, for every $z\in\mathbb H$,
\begin{align*}
f(z)=F([z])=c.
\end{align*}
Thus every weight $0$ modular form is constant. The reverse inclusion is immediate from the definition: a constant map $\mathbb H\to\mathbb C$ is holomorphic, is invariant under every fractional linear transformation, and has constant Fourier expansion at the cusp. Hence
\begin{align*}
M_0(SL_2(\mathbb Z))=\mathbb C.
\end{align*}
[/guided]
[/step]
[step:Use the cusp condition to identify the cusp forms]
Let
\begin{align*}
f\in S_0(SL_2(\mathbb Z)).
\end{align*}
Since $S_0(SL_2(\mathbb Z))\subset M_0(SL_2(\mathbb Z))$, the preceding step gives a constant $c\in\mathbb C$ such that
\begin{align*}
f(z)=c
\end{align*}
for every $z\in\mathbb H$. The Fourier expansion of $f$ at the cusp is therefore
\begin{align*}
f(z)=c.
\end{align*}
The cusp form condition requires the constant Fourier coefficient at the cusp to vanish, so $c=0$. Hence $f=0$.
Conversely, the zero function is a cusp form. Therefore
\begin{align*}
S_0(SL_2(\mathbb Z))=\{0\}.
\end{align*}
[/step]