Do they have a client installed on their servers that pulls the info out of block headers? How does it do it? What's the command?
Blockchain.info definitely has a client installed on their servers, that's where they get all the block data from. I heard they're using a fork of BitcoinJ.
In the Bitcoin-qt daemon, you can get the difficulty of the latest block with the getdifficulty command, and you can get complete information about every block, including the difficulty, with getblock.