Just some tidbits to throw in:
-- No one on the Enterprise knows that Pike gave Nero defense command codes. It could be they would think Earth would simply detect Nero coming and that would be sufficient to engage Earth's defenses to hold off Nero until the Enterprise gets there.
I mean, the Starfleet Command is orbiting Earth. That space station has to be miles across itself, and contain Starfleet's state of the art technology, including defenses. They had to think Earth is one of the most secure places in the galaxy.
-- For all we know, Nero's ship had a cloaking device, or at least something that allowed it to procede faster and with more stealth than 23rd century technology could detect. He may have appeared out of nowhere in orbit right above San Francisco. So, even if Earth was warned, they were unprepared for how he appeared.
-- Travel times. There's been debate on these boards about how long takes to get to from Earth to Vulcan (or from Vulcan to Earth). If it was a very short period of time, it's possible Nero was too close for a warning to be useful, and the Enterprise could get there quickly enough on its own to intervene and sound a warning.
-- Very early in production, while the plot was still unknown, a blue-screen picture of cadets starring at what turned out to be Nero's drill by the Golden Gate Bridge was released. Abrams said the scene being shot was like a Pearl Harbor attack. If Pearl Harbor could happen, then why not an attack on Earth like it? Especially when the foe has advanced techology.
-- Maybe the Enterprise notified Earth of Vulcan's destruction and that Nero was heading that way. They simply were shocked and dismayed by the information (a planet of six billion, a founding planet of the Federation, destroyed in seconds). It would be hard to believe. That caused them to delay initiating defenses while they digested the horror, perhaps wanted to deny it, and maybe sought confirmation of it. I mean, who could just matter-of-factly believe what just happened and procede routinely?
But the main thing for me is:
-- It seems the cadets at Starfleet were genuinely shocked to see Nero appear over San Francisco. They come running out of buildings in droves to gape and point at the drill. That is not the reaction of people who were warned (or prepared to defend themselves, or in the act of defending themselves). They were caught completely flat-footed. Based on that alone, I doubt Earth was warned.