U.S. citizens do not need a passport to fly from Puerto Rico to the continental United States (or Hawaii, Alaska, Guam, USVI, etc.). Puerto Rico is a U.S. territory; travel between it and the states is domestic.
Lawful permanent residents (green card holders) need their Green Card. Other visa holders should carry passport + valid U.S. visa + I-94 record. Consult an immigration attorney for case-specific advice.
Even though a passport isn't required, carrying one (or a passport card) is wise—it's the most universally accepted ID and useful if your itinerary changes to include an international leg.