The best punishments are those which show the child why they should not have done what they did. Therefore I would suggest that beating is actually less effective, than simply telling off your child.
Furthermore, there is much evidence that children that are beaten are much more likely to beat their wives and children in the future, starting a vicious circle of domestic violence. Teaching your children that violence is the method of getting your own way is also likely to cause problems for them at school where they will get sent out of class for starting fights, and in the workplace, where they will be fired.
As far as the law is concerned, that will vary between states. But generally anything that leaves a mark or causes permanent damage will be illegal. Smacking a child's bottom is probably acceptable, but I would not go further than that.
Please do not hurt your children
They are only young, and it won't help anyway.