You need to make sure that they know what they did was wrong. I don't think that you neccessarilly need to punish them, but you need to have a talk about the difference between right and wrong. Maybe explain the consequences that can result from stealing? Good luck!(:
At three, it's not really clear what they understand. But if they were mine, I'd sit down and explain it's wrong to take something that doesn't belong to you, and when your at a store you must pay for it before you leave. Use an example like, "What if someone stole your favorite toy, you'd be very sad and hurt". I don't think they understand much more than that. Take them back to the store or wherever they stole from, make them say they are sorry.
If it's a one time thing, have a talk and explain the difference between right and wrong. If it's an ongoing problem take something of his and give it to the person he stole the item from, along with giving the item he stole back. Do this right in front of him then ask him how he feels when someone else has his stuff. Do that a few times and he'll get the picture.....
if the child has actually stolen, explain that taking what isn't theirs is mean and wrong and spank them. if they haven't stolen yet try explaining that stealing is bad etc and if they do it they will be spanked and their toys taken away