The paper addresses the problem of range-based cooperative underwater target localization. In its simplest form, target localization aims to estimate the position of a stationary or mobile target by using range measurements between the target and a vehicle, called a tracker, undergoing a trajectory that can be measured on-line. In this context, the tracker must execute sufficiently exciting maneuvers so as to maximize the range-based information available for target localization. The paper extends this set-up to the case where the tracker works in cooperation with another vehicle, called companion, that can also measure ranges to the target and shares this info with the tracker. The latter may have access to the position of the companion or, in some cases, only to the range between the two vehicles. We consider three different operating scenarios where the motion of the tracker is chosen so as to increase the accuracy with which the position of the target can be estimated. The scenarios reflect the situations where the motion of the companion vehicle satisfies one of three conditions: i) the motion is not defined a priori and can also be optimized, ii) the motion is fixed a priori and is known to the tracker (scenario in which the tracker benefits from the extra information acquired by the companion vehicle, which tracks a desired trajectory in the context of a separate, independent mission), and iii) the motion is not known a priori and must be learned in the course of the mission. By adopting an estimation-theoretical settings, optimal trajectories are computed by maximizing the determinant of an appropriately defined Fisher information matrix (FIM), subjected to vehicle maneuvering constraints and inter-vehicle collision avoidance. Simulation results illustrate the methodology adopted for cooperative target localization.