It's critical to differentiate between general and specific deterrence. The vast majority of social science literature that challenges deterrence challenges the notion of general deterrence. I can deter you by punishing Mr. MacDonald more severely, but the question of whether I can deter your behaviour or Mr. MacDonald's by dealing with him directly is a different question. There is some evidence that it does have an impact.
On June 17th, 2010. See this statement in context.