Spanking is a widely debated topic. Many people believe no spanking is best. However, when your toddler can understand your words, the time for physical reprimand has definitely expired.
Spanking shouldn't be used as your prime form of punishment. Time outs are great for younger kids and taking privileges away works great for teen aged kids.