I think it's useful in certain circumstances mostly as an extreme way to get the childs attention quickly about something dangerous or very bad. In that kind of experience most kids who are old enough to get into trouble but not yet cognizant enough to know they're in danger wont understand any explanation of that danger but they will remember when mommy or daddy shouted and gave them a swat on the backside.
I have five little brothers the older three were all born within a year of each other(a year after the 1st was born came a set of twins.) and it was often my job to look after them, this means that eventually I was often looking after three mobile and hyper toddelers who could move like lightning and seemed determined never to make it to grade school. Our front yard looks onto a street and has no fence, but it has a nice shady tree. Now in the summer it's hot so we would take the boys into the front yard and for some reason all they would want to do is run into traffic. But when we would try to stop them by running in front of them or telling them to stay out of the road they would laugh thinking it was a game. the only thing that would get through was a yell of "NO!" and one swat on the backside. After they became old enough to talk and understand our words the spankings were no longer necessary or allowed.
I'm not advocating beating your kids, much like when you're training an animal that can't understand logic if you're causing pain you're doing it wrong. The point of any physical discipline should only really be to alert the recipient that things have become serious and they need to pay attention now, and even then only if you can't get that across in another way effectivly. If it's goal is to cause pain than it's abuse. Over the knee "I'ma gonna lern you!" spankings were never allowed in my house growing up and no other type of phyisical discipline(slapping, pinching, punching, whipping with a spoon or belt etc.) was allowed either.
I think it goes without saying that any child under two should never ever be spanked or even handled roughly in any way. There is really only a narrow window where I find such behavior useful and even then it should be reserved to keep them from something extreme(hot stove, road, bathroom cupboard, electrical items etc.)and used rarly or it will lose it's effectivness. I live in Canada where it is also illegal to spank children.