At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga.
Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus.
Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat.
The topic has been highly debated, and many philosophers and psychologists have thought about it intensely for ages, but the fact remains that punishment causes the human mind to avoid an action for fear of consequence and reward gives people incentive to do perform an action for the prospect of pleasure. Both are strong stimuli, and each acts in its own way, but both can be used to achieve the same goal.
You can tell a child to close a door and threaten him with a consequence, such as a pop on his wrist, if he does not do as he is told. The more severe the consequence, the more likely he is to obey. Conversely, the child would gladly close the door if offered a treat, a piece of chocolate for example, and would do so over and over if the incentive of being given a small amount of pleasure. The larger the reward, the more likely the child is to do as he is told.
In any case, the whole question is a moral/philosophical/psychological battleground and it could be argued until the end of time about which is better or more effective without ever achieving a definite answer because of how complex and ambiguous the circumstances are.