The technologies used in underwater and air–water (A–W) wireless communication networks (WCN) are increasingly attracting attention due to numerous modern applications, e.g., internet of underwater things etc. However, for practical implementations of these modern applications, the security of the underwater and A–W WCNs needs to be ensured beforehand. Thus, the main focus of this survey is to systematically discuss the security needs of underwater and A–W WCNs, and solutions proposed to date. Before extending our discussion on security, we initially cover the fundamentals of underwater and A–W WCNs. First, we provide a comprehensive overview of different underwater communication technologies: radio frequency (RF), acoustic, optical, and magnetic induction (MI) in terms of channel characteristics, merits, and demerits. The discussion is further extended to A–W wireless communication by presenting direct and indirect (relay-aided) techniques. Then we present the primer on information security which highlights the four fundamental properties of security (i.e., confidentiality, integrity, authentication, and availability) and security solutions (i.e., cryptography and physical layer security) built for the considered underwater communication technologies. In addition, we discuss at length the security aspects of the underwater and A–W WCNs by reviewing and summarizing the existing work in the literature. We notice that the related work on security of RF-based, magnetic induction-based underwater WCNs, and A–W WCNs is practically non-existent. Thus, we highlight this research gap in the literature, and propose a few additional security-related open problems too, that we believe deserve to receive more attention from the underwater, marine, and oceanic research community.