For Basic, the Moldvay rulebook. Clear rules, succinct but sensible GM advice.
For AD&D, I'm going to deviate a bit from the consensus. I refer to the DMG and PHB quite a bit, mostly got I get into arguments on these forums and use them as reference books! But when I was actually playing AD&D, it was Oriental Adventures that gave me the most pleasure, and that opened my eyes to what could be done with the game. I also like Manual of the Planes, but never successfully used it until about 20 years later in a Rolemaster campaign.
For 2nd ed, the City of Greyhawk boxed set: good setting, memorable NPCs (including the Circle of Eight), and a heap of 2-sided cards with mini-adventures on them.
I didn't play much 3E at all, but have quite a bit of stuff for it. I liked the 3E Manual of the Planes. And (if I can go 3rd party) I liked Arcana Unearthed - some nice setting ideas there.
For 4e, I think the closest book to a must-have - especially if you're not actually playing the edition - is Worlds & Monsters. As far as I know it's the only D&D book ever to discuss the story elements of D&D from the point of view of their metagame function (ie what sort of themes and play experience they are meant to evoke, and how a GM can use them to that end).