Most of the midrange hotels, including nearly all the aparthotels, are in or around El Cangrejo, in the center of Panama City . They are mainly clustered together on busy Avenida Eusebio A. Morales/2 Norte or the rather quieter Calle D. Many of the city’s tourist services and better restaurants are in the area  as well. More recently, hostels have been trying to establish a beachhead in the area.
Note: Panama City’s pioneering hostel, the Voyager International Hostel, changes location more often than the backpackers who stay there. On my most recent visit it was in a residential neighborhood in El Dorado, which is not a convenient spot for backpackers. Keep an eye on their website (but be sure to call or email ahead of time to double-check, since Voyager’s website and fliers are not kept very current): www.voyagerhostelpanama.net . The uncertainty of location, plus past complaints about service and accommodations, make this a backup hostel option, not a first choice.