I'd second The Temple of Elemental Evil. It has probably the best rules implementation of any computer game. Also, when I way back when I was a kid and still played dnd, I was pretty fond of that module. It was fairly buggy when released, but with the official patches, and the fan patches, it turned into a great game.
As others have stated, Planescape Torment is also a fantastic game that uses dnd rules. I can't remember the name of the rule book it uses (only offshoot book I can think of off the top of my head was Spelljammer, and that wasn't this game)
Neverwinter Nights 1 and 2 are games that were made with fan modules in mind. I have yet to finish the in box campaigns in either game, but some of the player made modules up for download are very good.
Knights of the Old Republic 1 and 2. First was made by bioware, and it was quite good. Based on Star Wars, but they used a modified baldur's gate system. 2nd game was made by, Obisidian, I think. It was pretty good too, but alot of end game content got cut out, so the ending is lacking. There are fan patches that add alot of the content back in, however.
I guess I'll also add Pools of Radiance - Ruins of Myth Drannor (spelling may be wrong. heck, the name might be as well). The company that made this was trying to recreate one of the old school gold box games, which I highly agree with in principle. the game, however, was an extreme mess when it came out. It was actually damaging windows installs, iirc, if you tried to uninstall the game. And that was only the worst of it's many, many bugs. They did manage to patch up a few things, and it no longer was breaking operating systems. In the end it was actually fairly playable. I still can't really recommend it though.