How does a pinched nerve cause pain (at the molecular level)?
Typically nerve compression or a "pinched" nerve is due to inflammation in the tissue through which a nerve passes. The gap is already quite narrow so any inflammation is quite potent. Inflammation causes you to feel things as more painful (hyperalgesia). In a similar way to how of you burn your hand then poke it, it hurts, when cells are damaged the receptors surrounding them are sensitised to be more reactive. Binding of many ligands involved in inflammation leads to higher than normal sodium influxes which means you feel pain as this impulse is sent. I could be a lot more detailed but not sure what level you want, however for much more detail see this review.