The relativistic amplitudes of pion photo- and electroproduction are calculated by dispersion relations at constant t. Several sum rules and low-energy theorems for the threshold amplitudes are investigated within this technique. The continuation of the amplitudes to sub-threshold kinematics is shown to provide a unique framework to derive the low-energy constants of chiral perturbation theory by global properties of the excitation spectrum.