This paper studies the localization problem of autonomous underwater vehicles (AUVs) constrained by limited size, power and payload. Such AUVs cannot be equipped with heavy sensors which makes their underwater localization problem difficult. The proposed cooperative localization algorithm is performed by using a single surface mobile beacon which provides range measurement to bound the localization error. The main contribution of this paper is twofold: 1) The observability of single beacon based localization is first analyzed in the context of nonlinear discrete time system, deriving a sufficient condition on observability. It is further compared with observability of linearized system to verify that a nonlinear state estimation is necessary. 2) Moving horizon estimation is integrated with extended Kalman filter (EKF) for three dimensional localization using single beacon, which can alleviate the computational complexity, impose various constraints and make use of several previous range measurements for each estimation. The observability and improved localization accuracy of the localization algorithm are verified by extensive numerical simulation compared with EKF.