Relationship between RAM size and 32-bit vs 64-bit word size
x86 is a 32-bit processor.  Memory addresses for x86 are 32 bits.  Each byte has a different address, so a 32-bit address means that you can only address up to $2^{32}$ bytes of memory.  $2^{32}$ bytes is 4GB.  That's why 32-bit processors are limited to 4GB of memory (per application).  In particular, each application can use only 4GB of memory.  (Technically, due to the way paging works, you can have more than 4GB of physical memory, but each application will still be limited to 4GB of physical memory.)

In contrast, a 64-bit processor can use 64-bit memory addresses, which allows addressing a huge amount of memory.  This has freed computers up to have more memory: they are no longer limited to 4GB of addressable memory.  (Technically, x86_64 has 48-bit addresses -- the high 16 bits of the 64-bit address basically can't be used -- but $2^{48}$ bytes of memory is still a humongous amount of memory, about 256 TB of memory.  That's more than anyone is likely to want to buy for now.)