  We characterize those pairs of weights $ \sigma $ on $ \mathbb{R}$ and $ \tau
$ on $ \mathbb{C}_+$ for which the Cauchy transform $\mathsf{C}_{\sigma} f (z)
\equiv \int_{\mathbb{R}} \frac {f(x)} {x-z} \; \sigma (dx)$, $ z\in
\mathbb{C}_+$, is bounded from $L ^2(\mathbb{R};\sigma)$ to $L
^{2}(\mathbb{C}_+; \tau)$. The characterization is in terms of an $A_2$
condition on the pair of weights and testing conditions for the transform,
extending the recent solution of the two weight inequality for the Hilbert
transform. As corollaries of this result we derive (1) a characterization of
embedding measures for the model space $K_\vartheta$, for arbitrary inner
function $ \vartheta $, and (2) a characterization of the (essential) norm of
composition operators mapping $K_\vartheta$ into a general class of Hardy and
Bergman spaces.
