As a general rule, US immigration does not come into play for employment outside the US even if the foreign-based worker is an employee of the US company. Regarding employment abroad by US citizens, that will depend in part on the laws of the country where the US citizen is residing and tax treaties between the US and that country.