Why is Cl2 only formed in acidic media?
Basically this is due to two reasons.

The disproportionation of chlorine in water looks like this:

$$
\ce{Cl2 + H2O &lt;=&gt; 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.