Before I tell you about my favorite trap or puzzle, let me tell you that I, as a DM,have totally screwed up traps and puzzles and for a few years didn't use them out of embarrassment.
See, I had this group of friends, Dave, Bill and Chris, and we played BECMI D&D. It was a great high school group, everyone was there to have fun, nobody took the game too seriously or not seriously enough. I remember we watched the 20/20 episode in which they performed an exorcism before gaming one night. The early 90s were an interesting time.
We were all High School Sophomores at this point in time, we met at Dave's house. Sometimes his dad would show us the .454 Casull he owned. Sometimes we'd play the crappy PC port of Indiana Jones and the Temple of Doom on their family PC. There was food, comradeship, and just enough D&D to keep us thinking. It was thinking that led me to building what I thought would be an excellent puzzle. I had decided to have a series of doors in a teleport trap, but they teleported in and out of the same hallway until you entered them in the right order. Sort of like the up, left, down, left of the Lost Woods in Zelda. The trick was the doors were numbered in roman numerals and the correct sequence was the first four Fibonacci numbers.
Except... I screwed up my notes and got the sequence wrong. The guys beat their heads into the table trying - CORRECTLY - the sequence the clues led them to. I got increasingly frustrated that they couldn't figure it out. When I finally gave up and said "Look, guys, this isn't THAT hard..." they pointed out to me in a rather annoyed fashion that they HAD indeed been entering the doors in the Fibonacci sequence. My notes, however, had "4" where "5" should have gone and I didn't catch it. I felt so incredibly stupid I didn't try traps or puzzles for years afterward for fear of making another mistake.
OK, so my favorite trap or puzzle has to be the damn Sphere of Annihilation in Tomb of Horrors. It's my favorite because it's just to easy to lose and entire damn party to it if they think it's some sort of teleporter. The trap is just so... well... trappy. It's an immediate, no save, no resurrection, no reprieve end to your PC, full stop, do not pass go. It's unfair, it's arbitrary, and it's right frigging there not even that far into the module. It is the essence of Old School traps. I love it. I hate it.