Like Malik said, the ESC is rated for the motor that it is controlling. Keep in mind that motors will usually be at about 60% of their max output with occasional periods spent at or near max output. If a motor's max power output draw about 30 amps then the motor might be at 18 amps most of the time. I'm saying this because the tendency is to buy ESC's that are very overrated for the max output let alone the lower partial output. But also keep in mind that our ESC's don't usually see a lot of cooling airflow so a 30A ESC for a motor that draws a max of 30A isn't good either.
A 30 A ESC is good for a motor that draws about 20 to 25 amps max. I don't know of any rules of thumb for sizing ESC's, most of it is common sense once you understand the issues involved.
Bart