Let $G$ be a finite index subgroup of $\operatorname{SL}_2(\mathbb{Z})$. Let $f$ be a modular form of a given weight on the upper half plane with respect to $G$. This means that
$f$ is a holomorphic function $\mathscr H \rightarrow \mathbb{C}$
For all $\tau \in G$, $f(\tau.z) = f(z)$.
$f$ is holomorphic at the cusps.
I have never felt like I understood the meaning of this last condition. Many textbooks I have looked at give ad hoc explanations that I either didn't understand or had no context for.
Is it possible to give a description in terms of complex manifolds? I believe it should have something to do with the quotient space $G \backslash \mathscr H$, which can be given the structure of a complex manifold in such a way that the quotient $\mathscr H \rightarrow G \backslash \mathscr H$ is a submersion.