Using 471×106BBˉ decays recorded with the \babar\ detector at the PEP-II e+e− storage ring, we present the time-dependent \CP\ asymmetry measurement in the radiative penguin decay mode B0→KS0ρ(770)0γ, yielding SKS0ρ0γ=−0.17±0.32−0.06+0.07. Since the result is extracted from the time-dependent \CP~asymmetry parameters SKS0π+π−γ=0.14±0.25−0.03+0.04 and CKS0π+π−γ=−0.39± measured in the neutral decay B0→KS0π+π−γ, we need to correct for the dilution of K∗(892)πγ in Kργ. The dilution factor DKS0ργ=−0.79−0.17+0.18 is determined from a study of the charged mode B+→K+π+π−γ, which produces more signal events and is related to the neutral mode by isospin. We need detailed knowledge of the resonance structure in the K+π+π− mass spectrum and measure branching fractions of different resonances to Kπ and ππ final states. We also measure the branching fractions B(B+→K+π+π−γ)=(27.2±1.0±1.2)×10−6 and B(B0→KS0π+π−γ)=(24.0±2.4−1.8+1.7)×10−6.