Let $f(\tau)$ be a modular form of weight $k$, where $\tau = x + iy \in \mathbb H$. Then $f$ is a cusp form if its constant Fourier coefficients at the cusps are zero. By modularity, it suffices to check at one cusp, say infinity.
Why does the constant Fourier coefficient at $\infty$ vanish if $y^{k/2}f$ stays bounded as $y\rightarrow \infty$?
You mean $f$ is weight $k$-modular for the full modular group. $SL_2(\mathbb{Z}) \setminus\mathbb{H}$ has only one cusp : $SL_2(\mathbb{Z}) i\infty = \mathbb{Q} \cup i\infty$.
That $f$ is analytic on $\mathbb{H}$ and $f(z) = f(z+1)$ implies $$F(q) = f(\frac{\log q}{2i\pi})$$ is analytic for $0 < |q| < 1$ so it has a Laurent expansion valid for $0 < |q|< 1$ $$F(q) = \sum_n a_n q^n, \qquad f(z) = \sum_n^\infty a_n e^{2i \pi nz}$$
Then there are $4$ cases for the behavior at $q=0$
$F$ has an essential singularity, $F(q) q^k$ is not bounded for any $k$
$F$ has a pole, $F(q) q^m$ is analytic ($f$ is a meromorphic modular form)
$F$ is analytic, $a_n=0$ for $n<0$ ($f$ is a modular form)
$F(0) = 0$ so $F(q) = a_m q^m +O(q^{m+1})$ for some $m \ge 1$ ($f$ is a cusp form)
For any $z$ $$a_n e^{2i \pi nz}= \int_0^1 f(z+x) e^{-2i \pi nx}dx$$ from $f(z) = z^k f(-1/z)$, if $f$ is a cusp form, taking $z= i/n$ we have a bound $a_n= O(n^{k/2})$.