RAM stands for 'Random Access Memory'. RAM is your phone's “working” memory rather than 'storage' memory (where you keep your pictures and music for example).
Generally speaking, more RAM is better because it'll let you do more things on your phone at once, or run more complex software, like 3D games.
If you use lots of smart features on your phone, then ideally you want at least 1GB of RAM. If you're mainly using your phone for talking and texting then it's less important.