Socrates implies that this view makes no sense. Doing the morally right thing must be good, intrinsically, for the moral person himself. (Otherwise, in what sense would it be good?) But that means that the opposite must be true as well: the person who fails to do the morally right thing suffers intrinsically by virtue of missing out on the good that comes from doing the right thing.
The implications of this position for how we think of punishment are quite radical. It implies, first, that people undergo punishment for their moral transgressions all on their own, without any additional infliction of suffering. The immoral person foolishly thinks she will benefit from her immoral deed. But she is mistaken and suffers from having cut herself off from the good.
As for those immoral people who don’t sense any suffering or loss from having committed an immoral, sinful act, their proper punishment should be education in the error of their ways. They must be made to see their mistake. Once they do, they will begin to experience the pain that follows from the realization that they have denied themselves what is truly good.
All of this follows of necessity from the logic of morality itself. What makes no moral sense at all is the popular view of punishment embodied in the vision of hell as a place for the infliction of external torments. To say that an immoral person deserves to suffer for his sins is like insisting that a man with cancer deserves to have his legs broken.