The difference is in the implied purpose of the action.
Hurl is a verb used when talking about a somewhat haphazard or forceful throw, far more aggressive than the actual verb "throw". As @J.R. pointed out, the phrase involving giving a gun to someone is a perfect example of the difference here: you wouldn't hurl a gun to someone (i.e. in order to give it to them to use), you would throw or, better yet, toss it to them. These are far more gentle verbs, implying that you intended them to be able to catch the gun, or at least you didn't mean for it to injure them. However, you might hurl a gun at someone, as a last ditch attempt to wound them once you have no more ammunition and you need to get away. Notice the difference in preposition: to throw to someone is to give them the item, but to throw at them is generally to try and hit them with it.
Regarding your sample sentences:
1) John hurls a gun to Mike
No. John throws a gun to Mike.
2) Mike hurls a ball to John
No. John tosses a ball to John. (Throws would work fine as well.)
3) Mike hurls John against the wall
Yes. Mike is aggressively sending John toward the wall, with the intention to hit the wall with his body in order to injure him. This aggression make hurls a perfect word choice.
4) Mike kicks John and it hurls John 5 feet away.
Maybe. This feels a bit odd because usually you don't talk about a kick hurling someone/thing. If you were to change the actor from the kick to Mike, hurls makes more sense. E.g.,
"Mike kicks John, hurling him 5 feet through the air."
Here, Mike is the one doing the hurling, not his kick. There are probably was to phrase it so that the kick could do the hurling without sounding too awkward, but it would take mroe work. Something like,
"Mike gave John a powerful kick to the chest, a kick strong enough to hurl John 5 feet through the air."