Are we talking about these two things as fictional universes (story/character-wise), the toylines, the connecting mediums (movies, comics, cartoons, etc.), or/and the percieved coolness of the above? This should be decided before we venture further.
Transformers were a really cool and innovative type of toy. The batman franchise didn't offer anything noteworthy in the toys department. Thus, transformers were cooler and therefore better.