geometry, complex numbers, complex line
$dim = 1$: Riemann surface, super Riemann surface
geometric quantization higher geometric quantization
geometry of physics: Lagrangians and Action functionals + Geometric Quantization
prequantum circle n-bundle = extended Lagrangian
prequantum 1-bundle = prequantum circle bundle, regularcontact manifold,prequantum line bundle = lift of symplectic form to differential cohomology
Generally, a theta function ($\theta$-function, $\Theta$-function) is a holomorphic section of a (principally polarizing) holomorphic line bundle over a complex torus / abelian variety. (e.g. Polishchuk 03, section 17) and in particular over a Jacobian variety (Beauville) such as prequantum line bundles for (abelian) gauge theory. The line bundle being principally polarizing means that its space of holomorphic sections is 1-dimensional, hence that it determines the $\theta$-function up to a global complex scale factor. Typically these line bundles themselves are Theta characteristics. Expressed in local coordinates on $\mathbb{C}^g$ a $\theta$-function appears as an actual function, satisfying certain transformation properties.
Specifically in the context of number theory/arithmetic geometry, by the theta function one usually means the Jacobi theta function (see there for more), which is the historically first and archetypical function from which all modern generalizations derive their name.
Certain integrals of theta functions yield zeta functions, see also at function field analogy.
Theta functions are naturally thought of as being the states in the geometric quantization of the given complex space, the given holomorphic line bundle being the prequantum line bundle and the condition of holomorphicity of the section being the polarization condition. See for instance (Tyurin 02). In this context they play a proming role specifically in the quantization of higher dimensional Chern-Simons theory and of self-dual higher gauge theory. See there for more.
Consider a complex torus $T \simeq V/\Gamma$ for given finite group $\Gamma$.
Say that a system of multipliers is a system of invertible holomorphic functions
satisfying the cocycle condition
Then a theta function is a holomorphic function
for which there is a system of multipliers $\{e_\gamma\}$ satisfying the functional equation which says that for each $z \in V$ and $\gamma \in \Gamma \hookrightarrow V$ we have
e.g. (Beauville, above prop. 2.2), also (Beauville, section 3.4)
mock theta function?
The following table lists classes of examples of square roots of line bundles
Introductions to the traditional notion include
D.H. Bailey et al, The Miracle of Theta Functions (web)
M. Bertola, Riemann surfaces and theta functions (pdf)
Modern textbook accounts include
David Mumford, Tata Lectures on Theta, Birkhäuser 1983
Alexander Polishchuk, section 17 of Abelian varieties, Theta functions and the Fourier transform, Cambridge University Press (2003) (review pdf)
Further discussion with an emphasis of the origin of theta functions in geometric quantization is in
Arnaud Beauville, Theta functions, old and new, Open Problems and Surveys of Contemporary Mathematics SMM6, pp. 99–131 (pdf)
Andrei Tyurin, Quantization, Classical and quantum field theory and theta functions (arXiv:math/0210466v1)
Yuichi Nohara, Independence of polarization in geometric quantization (pdf)
Relation to conformal blocks:
Relation to elliptic genera (see also at Jacobi form)