Depends on what you're farming...
- Herbalism and Mining: druids (notably: tauren druids)
- Archaeology: dwarves (any class)
- Fishing: death knights and shaman (water walking is quite useful)
- Mobs: basically any class that doesn't require a lot of downtime (e.g. Hunters, Protection Paladins, etc)