Speaking as a parent that has faced this debate, I'll put in my $0.02
Spankings, if done properly, are highly corrective for very young children. When one of our kids misbehaved at a young age (below age 5-6), they would get 2-4 swats on the behind. Any more than that, and you are taking out your anger on them (i.e. physical abuse). Any older than that, and instead of punishing and correcting the child, you end up embarrassing the child ('babies get spanked") and it becomes emotional abuse.
However, some kids are defiant enough that spanking doesn't work when they are below 5. Do you spank harder? No, you just find what works for that child. Taking away a prized toy or game, etc (but never their security blanket/stuffed animal) or something else that gets their attention.
The old "spare the rod and spoil the child" does not totally refer to beatings. That quote from Proverbs is often overdone. In the Hebrew text, the rod very often refers to the position of authority. So, if you give up your authority (let the kids run roughshod over you) you spoil the child.
As Dr. Dobson's book is aptly titled, "Parenting Isn't For Cowards." You have to know your child and know what works. For my daughter, it's take away all her books (which happened earlier this year, and she had to earn them back). For my son. it's something else.
I've seen many parents reported for 'child abuse' by some meddling idiot just for giving a proper spanking. It's horrid that one cannot correct a child in public when they need it most (like the kid in the checkout aisle screaming for candy?) because someone may report them and have their child taken from them (yes, it has happened!).
So, yes, it should remain legal, but never done out of anger or spite. Only to punish and correct.