If you mean the amount, as much as possible. ROM, as used in Android, mostly refers to what you'd call hard drive space in a computer, so you want as much as you need to store what you want to store. Loads of videos? You need a lot of ROM. A few documents? Not much.
RAM affects the speed with which the device operates. I prefer at least 2GB of RAM in an Android device.
If you meant something other than amount, let us know what that was.