I have been able to follow the fourier analytic proofs of the fact that for an even unimodular lattice $\Gamma$, $\sum_{x\in \Gamma}q^{x.x}$ is a modular form of weight $\frac{n}{2}$, but why this would be true seems very mysterious to me.
I am aware of modular forms being equivalently defined as nicely behaved functions on the space of isomorphism classes of lattices in $\mathbb{C}$, but it seems like the fact that lattices show up here is just a coincidence, the even + unimodular condition seems very strong, like its coming from some other source.
Does anyone know of an intuitive way to see this link?
Does anything similar give rise to forms for congruence subgroups?
Are there any other examples of combinatorially defined coefficients giving rise to modular forms? (I know the statement of modularity, but nothing about its meaning)