There is a strong presumption in favour of privacy in Jewish law. One may not build a window directly opposite your neighbour’s house from which you can peep into his home (Talmud Baba Batra, 2b). Lengthy sections of tractate Baba Batra deal with hezek re’iyah, damage caused by a prying eye.
We are not allowed to disclose confidential information without the permission of the person in question. Proverbs 11:13 says, “A base fellow gives away secrets, but a trustworthy soul keeps a confidence.” The Mishnah in Sanhedrin uses this verse to teach that judges may not publicise their deliberations after a verdict is reached. Rabbenu Gershom (960-1028) promulgated a cherem, excommunication, against those who read others’ letters.
How one balances the value of not snooping against the value of saving life, for example in the recent US National Security Agency.