Well, they have similar names and a both robots, so why not have them fight each other?
Ultron is firstly able to destroy a planet or wipe out the surface of one with nuclear weapons. Later he gets much stronger and kills all the Avengers in a stronger state (I think).
Unicron, as it is well known, is usually a planet devourer. However, I hear he is also capable of devouring Universes/dimensions in some forms.
First fight they are in their planet-destroying forms, second in their strongest.