The -us ending on pessimus shows that the adjective is nominative, singular, and masculine.
That's how we know that it describes the masculine nominative noun, ignis : "a very bad fire," "a terrible fire."
If we wanted to say, "Fire destroys the worst bridge," we would need to use an accusative singular masculine form of the adjective (namely, pessimum ), to modify the accus. sing. masc. noun, pontem .
EDIT: SuzanneNussbaum beat me to it and explains it nicely.
Here, you can tell based on the case of pessimus. It is nominative, so it would match with the noun in the nominative, which can only be ignis in this sentence. Pontem is accusative so it would need pessimum.
Adjectives match with the nouns they modify in case, number, and gender (when they modify multiple nouns gender of the adjective is treated a little differently).
Pōns is the bridge when it's the subject of a verb: "The bridge is big" = Pōns est magnus . "The bridge stands near Geneva." Pōns ad Genavam stat . This is called the nominative case of the noun.
Pontem is the bridge when it's either the direct object of a verb: "He destroys the bridge" = Pontem dēlet , or when it's the object of certain prepositions (that require accusative-case objects): "He runs towards the bridge" = Ad pontem currit .
I hope that helps; let me know if you need more explanation.