First of all, make the robot designs coherent and clear. They don't necessarily need to look cheap and blocky like in the cartoons or the toys, but there's certainly a middle ground between them looking like that and looking like the mess of metal they are in Bay's movies.
Give the Transformers distinct personalities and characterizations. This is done, to some degree, in the latest movie. In the earlier movies I swear all of the transformers sound exactly the same. Optimus has slightly distinct voice but everyone else sounds like Tom Waits talking through a voice-disguising device in an off-camera interview.
Make the distinct personalities of the robots not offensive stereotypes of Earth cultures.
Have a clear, standard, 3-act story structure with a goal that matters and isn't centered around a MacGuffin. Sure, we can have an action beat every so often but without making it a 20-30 minute long mess of noise and confusion.
Have that goal matter beyond "this will end the world." The movies do a LOT to tell us their MacGuffins will ned the world but somehow it hardly makes it matter because the story is too self-aware that the heroes will triumph so there's really no cause for concern.
Now, there's not necessarily wrong with having a MacGuffin. By and large the main threat in The Avengers is a MacGuffin, the Tesseract and Loki bringing in Chitauri doesn't really matter, story wise at least because we know it's a threat that'll be ended. But the difference between that and the Matrix of Leaderallsparkship, is that the story between the beginning of the movie and the end battle is about the characters learning to come together, work together to stop a threat. The Teserract doesn't really matter what DOES matter is how our characters learn to work together to stop it.
We don't really have that in the Transformer movies. There's this thing, and we have to stop it with explosions but not by really working together or growing as characters.
Make the transformers the more central characters. During large parts of the first three movie the Transformers are largely off screen and/or in the silent vehicle forms while our human characters do most of the work. Now, sure, having human characters may be necessary in order to make some connection with the audience but the human characters should be secondary to the robots and certainly shouldn't out number our robotic characters.
Cut back on the humor. Again, something the latest movie largely did but the other movies had too many slapsticky nonsense humor scenes. Now, sure, you can have humor but it doesn't need to be a broad vaudeville act. Again, there's a middle ground between 100% serious and two scenes of dogs humping one another a few minutes apart.
Make the action scenes a bit more comprehensible. Take into consideration these are massive, multi-ton, machines so they're not likely to move quickly like Cirque du Soleil dancers. In the movies the robots move way to fast and the camera is in too tight to have anything make sense.
Keep the movie inside 2-hours. Unless the story and plot *really* calls for it, there's no need for it to be over 2-hours. All of Transformer movies blow past the 2-hour mark and none of them have the story to support it so instead we get several 20-30 minute long scenes of noise and chaos. The latest movie does this a *bit* better by having some action/suspense beats that aren't noise and chaos but it still doesn't have the story to support a near-3 hour run time.
Tying into something above but make the transformers actual characters with actual motivations that the audience can understand and connect with. The source material may be shallow with Megatron and other villains' goal not really being much beyond "destroy earth, destroy the Autobots" but that doesn't mean that a movie would have to follow suit. It is possible to make the characters deeper with deeper goals and aims in mind. The only character in the TF movies to really have a character is Optimus Prime because, really, he's the only one we get to know, but hardly enough to "care" about mostly because the movie over-telegraphs that he's going to be okay.
I've never seen the cartoon movie but Optimus' death in the cartoon is usually regarded as very well done and played. In TF2? Not so much. It happens but it's almost instantly telegraphed he'll be resurrected by the end and not in a. "obviously this'll happen because he's the hero" sort of way.
No other transformer in the movies have any kind of character whatsoever. Not even Bumblebee who we don't get to know because he doesn't talk. Again, maybe the closest we come is the "new" Autobots in the latest movie. In the same movie "Ratchet" is killed and it's really hard to care because he wasn't a character that was used or built-up in the previous movies. (Was he even IN TF2 or TF3?!)
Really, there's a LOT that could be done. And the sort of sad thing is that Bay is.... "can" be a "good" maker of fun action films. Just somehow with these movies he apparently fell of his meds, lost his "No men" around him (probably largely a producer like Bruckheimer) allowing him to go completely and totally nuts. Leaving us with a mess.
It's possible to make a good movie, with robot central characters, have a good story, stakes that matter and interesting human characters and still have the movies be about "giant robots fighting."
Not spend so much time on little sub-stories that don't matter. This sort of goes with making the robots more central, but the first three movies (and even to a certain degree the fourth) spend a LOT of time dealing with the human characters. The first one on Shia getting a new car, trying to hook up with Megan Fox, dealing with his parents, etc. etc. etc. The second one Shia going to and getting set up in college, the third one Shia moping around and getting a new job and dealing with his new girlfriend's new boss. I don't think any of those are reasons people went into these movies.
No, no one went into a Transformers movie expecting Citizen Cane or anything like that, but movies aren't either Citizen Cane levels of art or complete nonsense. There is a middle ground and there's been countless successful action movies over the decades that don't boil down to not much more than, "John McClane must fight terrorists to rescue his wife!" But in that very simple premise there's a lot that goes on, great characters, great character moments and good use of down-time to build those things up. It's not just wall-to-wall chaos.
The Transformer movies could have been done A LOT better. I mean, did we NEED a full-on hairy ass shot of Turturro in 2? Or the countless, numerous, scenes of Shia full-throatedly screaming like a little bitch? Is that really what people consider to be a character to root for that makes for entertainment?
I think TF4 did many things a bit better than its predecessors but it's still very, very far from perfect.