  We measure the time-dependent $CP$ asymmetry in the radiative-penguin decay
$B^0 \to {{K^0_{S}}} \pi^- \pi^+ \gamma$, using a sample of $471$ million
$\Upsilon(4S) \to B{\kern 0.18em\overline{\kern -0.18em B}}$ events recorded
with the BaBar detector at the PEP-II $e^+e^-$ storage ring at SLAC. Using
events with $m_{K\pi\pi}<1.8{\mathrm{\,Ge\kern -0.1em V/}c^2}$, we measure the
branching fractions of $B^+ \to K^+ \pi^- \pi^+ \gamma$ and $B^0 \to K^0 \pi^+
\pi^- \gamma$, the branching fractions of the kaonic resonances decaying to
$K^+ \pi^- \pi^+$, as well as the overall branching fractions of the $B^+ \to
\rho^0 K^+ \gamma$, $B^+ \to K^{*0} \pi^+ \gamma$ and S-wave $B^+ \to (K
\pi)^{*0}_0 \pi^+ \gamma$ components. For events from the $\rho$ mass band, we
measure the $CP$-violating parameters
${\mathcal{S}_{{{K^0_{S}}}\pi^+\pi^-\gamma}} = 0.14 \pm 0.25 \pm 0.03$ and
${\mathcal{C}_{{{K^0_{S}}}\pi^+\pi^-\gamma}} = -0.39 \pm 0.20^{+0.03}_{-0.02}$,
where the first uncertainties are statistical and the second are systematic. We
extract from this measurement the time-dependent $CP$ asymmetry related to the
$CP$ eigenstate $\rho^0 {{K^0_{S}}}$ and obtain
${\mathcal{S}_{{{K^0_{S}}}\rho\gamma}} = -0.18 \pm 0.32^{+ 0.06}_{-0.05}$,
which provides information on the photon polarization in the underlying $b \to
s \gamma$ transition.
