While it has been my experience and practice to be prepared ahead of time, there are moments where a spur of the moment dungeon MUST be had or when a GM just doesn't have the time to do one themselves. Can't beat the skeleton. Just dress it up and its good to go.
Up until the demise of the website, I used the Jamis Buck's Dungeon Generator, which is still in use online at MythWeavers.com
In lieu of this tenuous medium, I found its zip file. I believe it's 3.0, although the prices of some magic items are 3.5 prices. It generates 3.0 NPC stats however.
In any event, I will put a link to the zip file on the bottom of my Pangea Campaign
page sometime today for those desiring the program on a more permanent basis. I would place a direct link here but my provider doesn't like sharing bandwidth.