Write your curve as $\Bbb{H}/\Gamma $, with $\Gamma \subset PGL(2,\mathbb{R})$ acting freely on $\Bbb{H}$. The pull back of $\mathcal{L}$ to $\Bbb{H}$ is the trivial line bundle $\Bbb{H}\times \mathbb{C}$; this implies that $\mathcal{L}$ is the quotient of $\Bbb{H}\times \mathbb{C})$ by $\Gamma $ acting by $\gamma \cdot (\tau , z)=(\gamma \tau , e_\gamma (\tau )z)$, where $\gamma \mapsto e_{\gamma }$ is a 1-cocycle of $\Gamma $ with values in $\mathcal{O}(\Bbb{H})^*$ (see the beginning of Mumford's Abelian varieties for a completely analogous analysis). It follows that the sections of $\mathcal{L}$ correspond to functions $f:\Bbb{H}\rightarrow \mathbb{C}$ satisfying $f(\gamma \tau )= e_{\gamma }(\tau )f(\tau )$.
These can be considered as modular forms in a generalized sense. If you take $\mathcal{L}=K_X^m$, the $m$-th power of the canonical bundle, we have $e_{\gamma }(\tau )=(c\tau +d)^{2m}$ for $\gamma =\begin{pmatrix}
a & b\\ c & d
\end{pmatrix}$, and $\ f$ becomes a genuine modular form of weight $2m$ for $\Gamma $.