Mikaela Banes (Megan Fox) does not appear in Transformers: Dark of the Moon.
In-Universe: The film implies she and Sam Witwicky (Shia LaBeouf) broke up. No explicit explanation is given.
Behind the Scenes: Fox was not invited back after publicly criticizing director Michael Bay (comparing him to Hitler/Napoleon) during Revenge of the Fallen press tours. Bay replaced the role with a new character, Carly Spencer (Rosie Huntington-Whiteley).
Fox later reconciled with Bay and appeared in his Teenage Mutant Ninja Turtles (2014), but never returned to Transformers.