[proofplan]
First we use the previously established modularity theorem for Hecke operators to obtain that $T_n f$ is again a modular form whenever $f$ is a modular form. The only additional condition needed for cusp forms is vanishing of the constant Fourier coefficient at the cusp $\infty$. We compute the constant coefficient of $T_n f$ from the Hecke coefficient formula and observe that it is a scalar multiple of the constant coefficient of $f$.
[/proofplan]
[step:Use the modularity theorem for Hecke operators]
Let $\mathbb{H} := \{z \in \mathbb{C} : \operatorname{Im}(z) > 0\}$ denote the complex upper half-plane. Let $f \in M_k(\mathrm{SL}_2(\mathbb{Z}))$ be a modular form of weight $k$ for the full modular group. By the standard modularity theorem for Hecke operators, already established before this result, the function
\begin{align*}
T_n f: \mathbb{H} &\to \mathbb{C}
\end{align*}
is again a modular form of weight $k$ for $\mathrm{SL}_2(\mathbb{Z})$; that is,
\begin{align*}
T_n f \in M_k(\mathrm{SL}_2(\mathbb{Z})).
\end{align*}
Thus
\begin{align*}
T_n\bigl(M_k(\mathrm{SL}_2(\mathbb{Z}))\bigr) \subseteq M_k(\mathrm{SL}_2(\mathbb{Z})).
\end{align*}
Here the cited result is the preceding theorem in the development: [Hecke operators preserve modular forms](/theorems/4244).
[/step]
[step:Compute the constant Fourier coefficient of $T_n f$]
Now assume $f \in S_k(\mathrm{SL}_2(\mathbb{Z}))$. Let $z \in \mathbb{H}$ be the upper half-plane variable, define $q := e^{2\pi i z}$, and let $a_m(f) \in \mathbb{C}$ denote the $m$th Fourier coefficient of $f$ at the cusp $\infty$ for each integer $m \geq 0$. Since $f$ is a cusp form, it has Fourier expansion at the cusp $\infty$
\begin{align*}
f(z)=\sum_{m=1}^{\infty} a_m(f) q^m,
\end{align*}
so its constant Fourier coefficient satisfies
\begin{align*}
a_0(f)=0.
\end{align*}
The Fourier coefficient formula for the weight-$k$ Hecke operator says that, for every integer $m \geq 0$,
\begin{align*}
a_m(T_n f)=\sum_{d \mid \gcd(m,n)} d^{k-1} a_{mn/d^2}(f),
\end{align*}
with the convention that $\gcd(0,n)=n$. Setting $m=0$, the divisors $d$ are exactly the positive divisors of $n$, and $mn/d^2=0$. Therefore
\begin{align*}
a_0(T_n f)
&=\sum_{d \mid n} d^{k-1} a_0(f) \\
&=\left(\sum_{d \mid n} d^{k-1}\right)a_0(f) \\
&=0.
\end{align*}
[/step]
[step:Conclude that $T_n f$ is a cusp form]
From the first step, $T_n f \in M_k(\mathrm{SL}_2(\mathbb{Z}))$. From the constant coefficient computation,
\begin{align*}
a_0(T_n f)=0.
\end{align*}
For modular forms on $\mathrm{SL}_2(\mathbb{Z})$, vanishing of the constant Fourier coefficient at the cusp $\infty$ is exactly the cusp condition. Hence
\begin{align*}
T_n f \in S_k(\mathrm{SL}_2(\mathbb{Z})).
\end{align*}
Since $f \in S_k(\mathrm{SL}_2(\mathbb{Z}))$ was arbitrary, we have
\begin{align*}
T_n\bigl(S_k(\mathrm{SL}_2(\mathbb{Z}))\bigr) \subseteq S_k(\mathrm{SL}_2(\mathbb{Z})).
\end{align*}
Combining this with the preservation of modular forms proves the theorem.
[/step]