Iron is extremely common and cheap, but requires much much higher temperatures to work with than bronze. Once the furnace technology was out there to make smelting iron and creation of steel feasible, poorer / less complicated civilizations were able to make iron weaponry and go up against their richer neighbors.
It's not quite like the D&D "this metal is higher ranking and does more damage".
Swords were generally not used in battle. But if used, a bronze sword was a bit more likely to crack than an iron sword. Bronze weapons were resistant to corrosion though. So that meant they did a better job in their secondary role: that of provider of status. A warrior with shiny armor, shield and sword is much more imposing and frightening than one with a rusty armor, shield and sword. Of course, in the bronze age, war was more ritualistic than war during the Roman empire, when war was much more like an industrial operation. For the purposes of the Roman empire, iron was probably doing a better job than bronze.
In combat though, spears were much, much more effective.
With one exception. As far as I can tell only one exception, but a big one. The Romans have figured out that all other people are quite bad at close quarters combat. Since soldiers were used to using spears, very few soldiers knew what to do if someone got in a close range than the length of a spear. The Romans then would bull-rush the enemy using their shield, and when close they would use their (quite short) swords. Without training, their opponents didn't stand a chance. Of course, this type of battle tactic required an enormous amount of training. The Romans did that because they were a very war-oriented society. Others couldn't match their level of training.
Even for the Romans though, who were regularly using swords, the choice of bronze versus iron would have made little difference. Although bronze is a bit more brittle than iron, and a bronze sword is more likely to break when it strikes a hard object, the Romans were trained to thrust the sword, not to use slashing moves. Thrusting is much more deadly, but less instinctive. It's another thing that requires extensive training, which the Romans were great at. For thrusting, I think a bronze and an iron sword do equally well.