There's a script for XP, if I remember correctly, that already randomly generates dungeons, but it's fucking terrible. RPG Maker VX has this capability standard with every map.
Your best option is to just map it yourself. If you want random, map a lot of different maps, then on the entrance to each dungeon, have a variable equal a random number then have a conditional statement checking what number was selected, then transport the player to the start of that dungeon. For instance, make 5 full dungeons. Number (in your head or on paper) each dungeon 0-4. In the event to enter a dungeon, make a variable that makes a random number 0-4. Then have a conditional branch checking if that variable is equal to 0, if yes, then transport the player to that dungeon - if not, then check if the variable is equal to 1, if yes transport the player to that dungeon - if not, then check if the variable is equal to 2, if yes transport the player to that dungeon - and so on for all your dungeons.