The short answer is “it depends”. Generally, traveling outside the United States while your green card application is pending is considered abandonment of the application. This general rule is subject to a few key exceptions.
First, green card applicants in valid L-1 or H-1B status (with valid visas) may travel while their application is pending if: (1) they are returning to the United States to resume employment with the same employer and (2) they are in possession of a valid L or H visa. Dependents of L-1 and H-1B visa holders may also travel while their green card applications are pending if the two above-mentioned criteria are met.
Second, K-3 and K-4 visa holders, spouses of United States citizens and their minor children, may also travel if they are in possession of a valid K-3/K-4 visa upon their return to the United States.
Lastly, green card applicants in possession of “advance parole” travel permission from USCIS, may travel while they await the adjudication of their green card. Advance parole and temporary employment authorization are provided to the applicant in one document (Form I-766) for green card applicants.
When considering travel during the pendency of your green card application, or any other immigration filing, it is important to seek the specific counsel of an immigration attorney.