I think "farm out" is the older usage. More contemporary is "outsource."
In terms of connotation "outsource" is far more international. In the gentler times of a few decades ago, firms might "farm out" some function to a more specialized local firm. Nowadays, when firms outsource a function, they typically send it a long way away, very often to India.