We apply the theory of harmonic analysis on the fundamental domain of SL(2, ℤ) to partition functions of two-dimensional conformal field theories. We decompose the partition function of c free bosons on a Narain lattice into eigenfunctions of the Laplacian of worldsheet moduli space ℍ/SL(2, ℤ), and of target space moduli space O(c, c; ℤ)\O(c, c; ℝ)/O(c)×O(c). This decomposition manifests certain properties of Narain theories and ensemble averages thereof. We extend the application of spectral theory to partition functions of general two-dimensional conformal field theories, and explore its meaning in connection to AdS3 gravity. An implication of harmonic analysis is that the local operator spectrum is fully determined by a certain subset of degeneracies.