So, pulling RGB from the Genesis - it's 15khz, so all the sync restrictions apply.
That aside, you want to hunt down the CXA1645 or CXA1145 chip (depending on the age of the genesis). This chip takes the unbuffered, unclamped RGB from the Genesis VDP and processes it into Composite and S-video. more importantly for us though, it will buffer and clamp the RGB signal (so the levels are more appropriate). You want to connect VGA pins 1, 2, and 3 to the CXA1*45 chip's RGB out pins R, G, and B respectively. The CXA1*45 Sync signal goes to VGA pin 12 (middle of the bottom row) for composite sync. The entire middle row, and pin 5, should be tied to ground (GND). The rest should be left untouched.
This also applies directly to the SNES, just it's not a CXA1*45 but instead a Nintendo-labeled chip (often says S-RGB). The same principle applies.
You'll want to put 75ohm resistance on each line for a VGA monitor, though, otherwise it will be too bright and possibly noisy.
A lot of people say to put capacitors in line on the signals. I have tried this and had nothing be improved; in fact it's quite the opposite - I've had it get substantially worse, being blurry or noisy. For some older monitors you might need it but unless you know you need it I do not recommend it.