Instead of the principal congruence subgroup $\Gamma _g(q)$, suppose we consider the subgroup $\Delta _g(q)$ consisting of matrices $u= \pmatrix {I_g & S \\ 0 & I_g}$ where $S$ is congruent to the zero matrix modulo $q$, and the conjugates of $u$ by the involution $J_g$. Then this subgroup has finite index in $\Gamma _g(q)$ if $g\geq 2$. This is a well known theorem of Bass, Milnor and Serre (this is in an IHES paper where they also prove the congruence subgroup property for $Sp_g({\mathbb Z})$). If you want some invariance properties for your function, and you can check that it is invariant under these generators, then you know your function lives on some congruence subgroup. This approach is used by Borel-Wallach in their book "Continuous cohomology, discrete subgroups, ..." (see the chapter on the Weil representation).