Going by the list at http://en.memory-alpha.org/wiki/Bottle_show
, I'd pick TOS: The Doomsday Machine
as the best bottle show, since it's my all-time personal favorite episode anyway. A runner-up would be TNG: The Offspring.
Quite a few of those totally suck, especially TNG: Shades of Gray.
However, I'm not convinced that that list is entirely accurate or complete.
Further discussion of bottle episodes can be found at http://tvtropes.org/pmwiki/pmwiki.ph.../BottleEpisode