Why is Cl2 only formed in acidic media?

If aqueous $\ce{NaCl}$ and $\ce{NaClO}$ are added together no reaction occurs, but if you add dilute acid to the solution $\ce{Cl2}$ gas is formed. Why does this reaction only happen in acidic media? I know that there's something to do with the reduction potentials but I couldn't formulate a full explanation for this effect.

$$\ce{Cl2 + H2O <=> H+ + Cl- + HOCl}$$
So you need the $\ce{H+}$ to shift the equilibrium to the halogen site and the halogen produced is a gas and will leave the reaction.
The other explanation is that, as $\ce{HOCl}$ is an oxidizer and a $\ce{Cl+}$ transfer-agent, both of these actions happen in an $\ce{S_{N}2}$-type fashion. For the $\ce{Cl+}$ transfer it is called associative activated substitution of a nucleophile, here $\ce{Cl-}$. So it's pretty much like an $\ce{S_{N}2}$ reaction, where $\ce{H-Cl}$ and $\ce{Cl-OH}$ react.