Electro-optic sampling has emerged as a new quantum technique enabling
measurements of electric field fluctuations on subcycle time scales. Probing a
second-order nonlinear material with an ultrashort coherent laser pulse
imprints the fluctuations of a terahertz field onto the resulting near-infrared
electrooptic signal. We describe how the statistics of this time-domain signal
can be calculated theoretically, incorporating from the onset the quantum
nature of the electric fields involved in the underlying interactions. To this
end, a microscopic quantum theory of the electro-optic process is developed
using an ensemble of non-interacting three-level systems as a model for the
nonlinear material. We find that the response of the nonlinear medium can be
separated into a classical part sampling the terahertz field and quantum
contributions independent of the state of the probed terahertz field. The
quantum response is caused by interactions between the three-level systems
mediated by the terahertz vacuum fluctuations. It arises due to cascading
processes and contributions described by quantum susceptibilities solely
accessible via quantum light. We show that the quantum contributions can be
substantial and might even dominate the total response. We also determine the
conditions under which the classical response serves as a good approximation of
the electro-optic process and demonstrate how the statistics of the sampled
terahertz field can be reconstructed from the statistics of the electro-optic
signal. In a complementary regime, electro-optic sampling can serve as a
spectroscopic tool to study the pure quantum susceptibilities of materials.