I think the amount of ram doesn't really matter, unless you're running out of
it. I still make do with 1G.
The kernel is the most complicated piece of software you'll ever find.
Changing it can do pretty much anything. There's like a million configuration
options. If you add all kind of patches to it, then there's even more change
possible or of course you could hack the code yourself.
To make a short, simple and wrong answer to a question that would require a
long and complex answer one could say that some kernels are better suited for
servers and some for desktops. Some for embedded devices and some for
mainframes. Different architectures and different peripherals. Etc etc etc
Compiling a custom kernel is relatively straight forward process but as said
there's a million configuration options and finding out the best possible
combo is something of a black magic. Of course all this is no reason at all
to not try. I fact I suggest everybody does it a few times. I wrote a short
tutorial here https://trisquel.info/en/wiki/compiling-gnu-linux-libre-kernel
Please notice that since that patch is against the vanilla kernel, it can
generate some errors against Linux-libre. Not very likely though and warnings
are not critical anyways unlike errors.