Until recently, if you were the spouse of a U.S. lawful permanent resident (green card holder) who died before you could immigrate, the visa petition was cancelled and you were out of luck. You could no longer use that visa petition as the basis to apply to become a permanent resident yourself. In October of 2009, however, Congress changed the law. Now, under certain conditions, the visa petition filed by your now-deceased spouse may still go forward.
If USCIS approves the visa petition that your spouse filed for you (on USCIS Form I-130), you (and your children) may be able to adjust status once your Priority Date becomes current. This assumes that you lived in the U.S. at the time of your spouse’s death and continue to live in the United States. It also assumes that no other bars exist to your eligibility for adjustment of status, such as your being out of status. For example, it may be necessary for you to have lived in the U.S. in lawful status all this time, and to have entered the U.S. lawfully.
There are also provisions for allowing a substitute Affidavit of Support, given that your spouse can no longer submit one. Unlike with the situation of the spouse of a U.S. citizen, however, this new law does not allow you to petition for yourself if your spouse never filed the petition.
This is a relatively new area of the law. USCIS is still developing some of the regulations needed in order to know how to process these cases. If you are in the unfortunate situation of dealing with the untimely death of the petitioner in your immigration case, consult an immigration attorney.