Look up "whistleblower" on Wikipedia. No one can be prosecuted for telling their Congressional Representative that they think a law is being broken by a federal agency. Snowden had a choice -- go to people in authority (Congressman, Senator, Attorney General, etc.) and report what he knew in confidence and be protected by the law -- OR give away classified information (probably to Putin to buy asylum) and be a criminal.
As I am one of those happy that Snowden leaked the information about the NSA, he is also a great example of why they should be penalized. He went straight to china and Russia, selling the info to other countries that can harm us. There is a lot of classified information that keeps us safe, and if it did happen to be "leaked", National security can be severely at risk. It all Depends on the info however. If it is something that effects the citizens, like what the NSA were doing, then no it shouldn't be penalized, but that's not all the info Snowden had, he sold harmful info to other countries.
Whether a person who leaks classified information should be penalized depends on a number of factors.
First of all, why did they leak the information? If they intended to cause harm, they should be penalized but if they are revealing unlawful or controversial issues that the public should know about then they shouldn't be penalized.
Secondly, it depends on the importance of and extent of the leaked information. Did they leak information that may be harmful, or greatly disrupt the workings of the organization that classified it? On the flip side there is also the question of how important it is for the public to know about the information, and whether it is something that was unlawful or a violation of rights or constitution. It is also important to consider to what extent the person was careful to minimize the damage caused by the leak, and their taking measures to ensure it is used carefully and for good reason.
Finally, it is important how the information is eventually used and what the results of leakage are. This can be quite difficult to determine in some cases, for instance the results will not always be clear or easy to quantify. If the information ends up being very harmful in spite of intentions to the contrary, the person should still be penalized to a certain extent. If on the other hand the leak causes greater good and brings about necessary discussions and changes, which out weigh the potential damage then they should not be penalized.
At any rate... You can clearly see what I mean when I say it depends. I chose the no side, because of the Snowden picture. That set a certain context for me. But as you can see I would sometimes say yes and sometimes no... It honestly depends on the situation. There is no general rule in such a case.
Sometimes law-breaking is OK. Rosa Parks broke the law. What would happen if she didn't? Yes Rosa Parks is technically a criminal but the outcome was good. Just like Germans helping Jews during the holocaust. The outcome here was good. The government has no business reading my email. Not all this information is used to help a terrorist. Many if not all of the documents leaked are not information that would necessarily help terrorist, but rather they contain information that the government does not want the public to know but that they should know. We are not going to die because of what Edward Snowden leaked.