This is a debatable fight. Both were wanted for a very long time and both have its ups and down.
Iron Man
Pros: Very exciting, a movie that everyone will love because it has a little of everything, has the coolest tech out of Transformer, and has some great actors
Cons: maybe a little low on the action, didn't like the actor playing Virginia, and the making of the suit had taken a pretty big chunk of the movie
Overall: 8.5/10
Transformers
Pros: The impressive effects in the movie was superb, you can actually see every piece of the robots, the movie wasn't a predictable movie, and has very good actors
Cons: all the parts distract you alot, a little long so you might lose interest over time, and the ending was maybe a bit corny
overall: 8/10
So after all the information here, I would say Iron Man triumphs over the transformers. sorry Optimus
Iron Man was great and witty, but Transformers was masterfully done, with hotter babe scenes. Maybe it gives up a little in one liners, but it had a better soundtrack.