There’s a number of ways to do random generation for roguelikes, actually! for spelunky, Mark Brown made an excellent video about how Spelunky’s levels were made:
a TL;DW for the video is that Spelunky’s levels are on a 4x4 grid, starting at the top and placing a room randomly either left, right, or down. when the path tries to go down at the bottom level, an exit is made. Then, one of a large number of rooms created by Derek Yu that fits the room type needed is used, potentially with additions in non-essential tiles. Following the level map, enemies and lot are weighted based on where in the map they generate in order to encourage certain types of play. In essence, the levels are half generated and half created.
As for the actual design approach, it really depends on how your game plays. The mechanics of your game will largely shape what you want out of a level, and so you’ll most likely have to experiment to figure out what exactly you want your game to play like. Sorry I can’t give more helpful advice on this one.