Misusing super-secret codes would be a great way to neutralize an automated, integrated system of powerful defensive fortresses, which is what the ST:TMP dialogue seems to describe, and what we see in action in DS9 (albeit on Cardassian rather than UFP worlds).
But there should also be all sorts of "rogue" defense elements that would not be dependent on commands from an integrated system. Nero could shut down the big phaser fortress at the Moon and the defense satellites at 1,000 km orbits, but how would he stop the armed shuttles from launching from Edwards SFB?
Of course, he'd probably have all sorts of options available with the codes, beyond shutting down the defenses. He could tell defenses to fire on each other, he could order the fighter-shuttles to be launched towards Siberia rather than San Francisco, he could cut off power to anything from defensive cannon to the charging racks of phaser rifles in the nearest garrison. But that would call for some finesse, which a miner might lack.
Of course, a 24th century Romulan miner might have a "Disabling Primitive Planetary Defenses" computer application installed in his mainframe as standard; indeed, his government might insist that he carry one. Or Nero might have spent those 25 years cobbling together everything he needed to defeat UFP planets, and obtaining the necessary offensive program would be within his means even if none of his crew were expert programmers. Kidnapping was his major forte, after all...
But yeah, it seems clear that Nero got the codes to paralyze Earth from Pike. And also that he got the codes to paralyze Vulcan from somebody else, considering Vulcan never launched any fighter-shuttles, either.
(I mean, if Vulcan or Earth launched such things, we know of no possible defensive weapon that Nero could have used to stop them. Indeed, we see that he has no weapon he could use to stop Spock when the Vulcan uses a small craft to destroy the drill. Code trickery would appear to be Nero's only chance of pulling off these attacks.)
Timo Saloniemi