As we have a growing list of options when building up a system, the order of choosing hardware is changing.
Are you going to install a 32 or 64 bit OS?
If you might switch to a 64 bit OS within the expected life of the system, follow your decision path for a 64 bit OS.
Choose your CPU.
AMD, Intel, then class and socket.
Select your motherboard. For a 64 bit OS, make sure that you could install at least 16GB of RAM if you wanted to.
Once you have your motherboard selected, you know whether you will use DDR2 or DDR3 RAM.
Now, you need to select the RAM that will provide the best performance with your CPU. If possible, select RAM speed so that an even multiple of the RAM speed equals the CPU FSB speed.
Then, choose how much RAM to install.
If you are going to use a 32 bit OS, even for a top end gaming rig, I would not install more than 3 GB of RAM. With a high end video card, at least 1 GB of the 4 GB address space will not be available for system RAM. So, any RAM above 3 GB just sits there and draws power.
For a 64 bit OS, install as much RAM as you can afford / the motherboard will take.
Chas