Underwater Wireless Sensor Networks (UWSNs) are expected to support a variety of civilian and military applications. Sensed data can only be interpreted meaningfully when referenced to the location of the sensor, making localization an important problem. While global positioning system (GPS) receivers are commonly used in terrestrial WSNs to achieve this, this is infeasible in UWSNs as GPS signals do not propagate through water. Acoustic communications is the most promising mode of communication underwater. However, underwater acoustic channels are characterized by harsh physical layer conditions with low bandwidth, high propagation delay and high bit error rate. Moreover, the variable speed of sound and the non-negligible node mobility due to water currents pose a unique set of challenges for localization in UWSNs. In this paper, we provide a survey of techniques and challenges in localization specifically for UWSNs. We categorize them into (i) range-based vs. range-free techniques; (ii) techniques that rely on static reference nodes vs. those who also rely on mobile reference nodes, and (iii) single-stage vs. multi-stage schemes. We compare the schemes in terms of localization speed, accuracy, coverage and communication costs. Finally, we provide an outlook on the challenges that should be, but have yet been, addressed.