When talking about punishment, there are usually four justifications that come up:>retribution, forcing the crook to repay the victim through money, labor, etc.>deterrence, scaring any would-be crooks straight by setting an example>rehabilitation, transforming a crook into a contributing member of society>incapacitation, rendering the crook incapable of further wrongdoing
Corporal punishment has no retributive value, which is a big mark against it in my book.
In any form it is a great deterrent. But it doesn't really make the crooks see the crime as bad, just the punishment. In other words, they're only good so long as there's someone to crack the whip or so long as they're sure they'll get caught.
Rehab is pretty situational, the occasional spanking sets a child straight just fine so long as it's kept in moderation. On an adult it won't do much unless you pass the threshold where it become senselessly cruel.
Incapacitation in regards to corporal punishment is primitive. Sand-nigger tier, chopping off the thumbs of thieves and stuff. Incapacitation works better when talking about incarceration.
In schools it would be good IN THEORY but as we all know teachers can become real sadists. It becomes less of a disciplinary measure and more of a stress outlet. The oversight required to keep sadistic assholes in check makes it impractical in the current "superschool" system. Might be more justifiable in a small farm schoolhouse type deal, where all responsibility falls on the teacher instead of some amorphous bureaucracy.
For adults and in prisons I don't see much value, as said above it'd take a lot more than a few passes with a belt to set them straight. It'd be torture pure and simple, and that doesn't usually create functional citizens. Adult psychology is different from kid psychology.