In the 2007 movie, Optimus explains that the Autobots learned to speak English from the world wide web. One could reasonably assume that the Decepticons did as well.
But Megatron wakes up after being trapped in stasis within the ice and says, "I am Megatron!" and then goes outside and speaks with Starscream in English.
There is at least one scene where the Decepticons (Starscream, I believe) speak in Cybertronian and they display English subtitles, but they don't do that with Megatron.
Megatron speaks to Sam in English as well, so it's not just a matter of languages being translated for the ease of the viewer following along.