Yes, if every person that took a hostage was taken out by a sniper, then people would stop taking hostages. Also, if they do have a hostage, then they deserve to be killed because they are making a threat saying that they are willing and going to end someones life.
Typically someone who takes a hostage does so as a last resort. They are holed up, they are surrounded, and they don't have any options. Their desire to survive outweighs their own morality. It's true that a lot of hostage takers end up not killing their hostages, but regardless of whether or not they stoop to that level, the possibility still exists, and they're still people who have no appreciation for their fellow humans.
Yes killing hostage takers cleanly would result in less deaths in the long run but morally it likely isn't a good idea. One we have to make sure they are truly guilty and we have the right person. Then we have to make sure we kill them without killing others. Peaceful solutions are better but are riskier.
I don't think that killing a hostage taker right away is always the best choice and I don't think that you could say that killing first and asking questions later is really a good method. Many hostage takers will release their hostages and it generally happens without any violence to the victims. Attempting to shoot a hostage taker and missing could result in danger for the victims.
The unfortunate truth is that if an enforcement body shoots and kills a hostage taker that was not acting as an immediate threat to anyone, it is considered murder. If there is a chance for a peaceful resolution, then we are required to attempt to reach such a resolution. Finding a peaceful resolution should not be confused with negotiating. Sometimes the hostage taker is not even sure what will really satisfy the situation. Other times the person is mentally ill and thinking irrationally. Time can sometimes resolve that. Killing the hostage taker offers no future options.