You can travel to the United States while Form I-130 petition is pending only if you obtained a B-2 visitor visa. Still, it can be difficult to obtain a B-2 visa for a noncitizen whose I-130 petition is processed.
When applying for a visitor visa, you must provide as much documents as possible to prove that:
- You are going back to your home country shortly; and
- You have enough money to live in the U.S. during your travel.
Customs and Border Patrol (CBP) usually doubt that you are going to leave the United States on B-2 visa. Therefore, a CBP officer can forbid you entering the country even if the U.S. Embassy or Consulate granted you a visitor visa. The I-130 petition in your name will also be declined if you were ordered removed by the border control authorities.