Pratibha writes, "I was on a valid H1B visa and got married to a US citizen. While I was still enjoying my married life and not thinking about the immigration paperwork to apply for a green card since I was already legal, I was laid off. Then we rushed to do the paperwork and it has all been done. I have already received USCIS Form I-797. Still, I am terrified that ICE may come knocking on our door and deport me because for a few weeks that it took us to finish the paperwork, I was out of status. Am I legal right now? Do I have any reason to worry?"
Unfortunately, there are no clear guidelines on how long someone on an H1 visa can stay legally in the United States after the job has ended, but the rule of thumb is that one should wind up their operations as soon as possible. For example, if an alien has kids in school, they maybe even able to make a case that they would like to stay till the school year ends. Similarly, medical arguments can be made. However, a few weeks is generally a good time for someone to leave without raising the ire of the immigration authorities if you were to apply for another immigration benefit in the future.
In your case, however, due to your marriage to a United States citizen, none of this matters. Basically, when your application package was received by the USCIS, you are under legal status till a decision is made in your case. If you applied for an EAD using USCIS Form I-765, you maybe even able to find another job. When your green card is approved, you will simply update the information with your employer. Considering how busy ICE is trying to deport criminal illegal immigrants, unless you get into serious trouble with the law, you will not even interact with them. For peace of mind, though, just to prove that you are legally in the country, you can keep a copy of your USCIS Form I-797 with you when going outside the house. This is evidence that your application is being reviewed and you are currently in lawful status. The only time that you maybe in trouble is if your application for permanent resident status is rejected (extremely rare) either because your marriage is a sham or there is something in your background that does not allow you to become a green card holder. In that case, deportation proceedings will be started against you but prior to that you will get a chance to appeal that decision before an immigration judge.