The best rule of thumb regarding travel during the pendency of your green card case is not to do so. We have seen a number of individuals unknowingly sabotage their adjustment of status applications by traveling outside the US without taking the proper precautions. The concept is this: when an adjustment of status application is filed with USCIS, the individual is applying to convert his/her status to that of a permanent resident inside the United States. With a few limited exceptions, any trip taken outside the US while the adjustment is pending is normally construed as abandonment of the application. Therefore, it is extremely important that if you have an I-485 pending with USCIS, you remain in the US. Any departure may result in not only a denial of the adjustment application but also potentially obstruct readmission. Worse, a departure may trigger an unlawful presence bar (either three or ten years, depending on the length of time an individual has been unlawfully present) and prevent the individual from re-entering.
That being said, there are limited exceptions that may allow an applicant to travel without abandoning the adjustment. Individuals who hold H-1B status with the appropriate visa may, in certain instances, travel and re-enter on their H-1bs while keeping their I-485 applications intact. K-3 visa holders may also have the ability to travel while their applications are pending. (Needless to say, even these individuals need to consult with immigration attorneys before assuming their trips are permissible without any consequence.) For applicants who have neither, the safest way to travel without jeopardizing their adjustment is to apply for a form of pre-authorized travel permission called Advance Parole. However, advance parole is not a free pass to travel for mere whims. In most cases, the applicant will have to demonstrate a legitimate reason warranting or justifying the proposed travel. Moreover, the applicant should not travel without 1) receiving an approval of the I-131 application, 2) having the advance parole document in hand, and 3) consulting with an immigration attorney to evaluate potential risks and impact of travel. #3 is especially important because the approval of advance parole does not, in and of itself, necessarily signify that it is safe to travel. Although it is a form of approved permission to travel, it does not minimize or waive serious legal issues, including but not limited to the effect of prior removal orders and criminal history, to name a few.
The above is general information only and not intended to substitute for legal advice or create an attorney-client relationship. If you need specific legal advice regarding your situation, please consult with an attorney.