The numbers are the most important.
Nvidia - number of number and first number is the series:
9xxx
2xx
4xx
5xx
etc
second number is the family, with higher being better performance:
9500GT, 9600GT, 9800GT
GTS250, GTX260, GTX270, GTX280, GTX295 etc
AMD:
First number is the series:
3xxx
4xxx
5xxx
6xxx
etc
second number is the family, again, higher being better:
54xx, 55xx, 56xx, 57xx, 58xx etc
Third number, higher is better:
5770 better than 5750
6970 better than 6950 etc
5xx are the latest Nvidia cards, 6xxx are the latest AMD.
As for which is the best to look for, that would depend on what your budget is