Rust is the result of water reacting with metals such as iron. It is a thoroughly unpleasant situation for any Transformer. Just ask Steeljaw.
Strangely, the fleshy bipeds appear not to suffer from rust. Maybe they're not as weak as everyone first thought.
Fiction
Marvel Comics
As a physician, Ratchet was quite concerned about rust. When he observed humans using thin strips of wood to traverse moist, powdery surfaces, he regarded it as foolhardy -- surely it would cause them to rust! Repeat Performance!
Later, when Skids brought the human Donny Finkleberg into Ratchet's medical bay to speak with Optimus Prime, Ratchet was most displeased. The medical bay was a sterile environment, and while humans don't rust, they sweat, which could have gotten moisture into Optimus Prime's wound, thereby starting a rust infection. Ratchet demanded that Skids not return until he had dehumidified the human, but he was overruled by Prime. Heavy Traffic!
"Rustbucket" is a fairly common insult among the Transformers. The Seacons once insultingly referred to Blaster as "Autobot rust droppings". Club Con!
Generation 1 cartoon
A disease known as Cosmic Rust was responsible for wiping out the Thirteenth Legion of Autobots on Antilla. The Decepticons on Earth later contracted Cosmic Rust, even though they were rust proof. Fortunately for the Decepticons, Perceptor had developed a new solution known as corrostop, which would prevent rust and corrosion, curing the disease. Unfortunately for the Autobots, Megatron infected Perceptor with Cosmic Rust, resulting in the Autobots becoming infected when Optimus Prime rescued Perceptor. Fortunately, the Autobots were able to create more corrostop. Cosmic Rust
Beast Wars
When Cheetor wondered aloud the cause of Depth Charge's attitude problem, Rattrap guessed that it was probably rust. Makes sense. Deep Metal
Dreamwave continuity
On Cybertron, there is an entire sea of unstable planetary matter called the Rust Sea.
2007 Live Movie
Ironhide complained of his foot going to rust after Sam Witwicky's dog "lubricated" it.