Fish communities associated with coral reefs worldwide are threatened by habitat degradation and overexploitation. We assessed coral reefs, mangrove fringes, and seagrass meadows on the Caribbean coast of Panama to explore the influences of their proximity to one another, habitat cover, and environmental characteristics in sustaining biomass, species richness and trophic structure of fish communities in a degraded tropical ecosystem. We found 94% of all fish across all habitat types were of small body size (≤10 cm), with communities dominated by fishes that usually live in habitats of low complexity, such as Pomacentridae (damselfishes) and Gobiidae (gobies). Total fish biomass was very low, with the trend of small fishes from low trophic levels over-represented, and top predators under-represented, relative to coral reefs elsewhere in the Caribbean. For example, herbivorous fishes comprised 27% of total fish biomass in Panama relative to 10% in the wider Caribbean, and the small parrotfish Scarus iseri comprised 72% of the parrotfish biomass. We found evidence that non-coral biogenic habitats support reef-associated fish communities. In particular, the abundance of sponges on a given reef and proximity of mangroves were found to be important positive correlates of reef fish species richness, biomass, abundance and trophic structure. Our study indicates that a diverse fish community can persist on degraded coral reefs, and that the availability and arrangement within the seascape of other habitat-forming organisms, including sponges and mangroves, is critical to the maintenance of functional processes in such ecosystems.