As described in Nolo's books on immigration law, some immigrants whose U.S. citizen husband or wife dies before having had a chance to help start or complete their application process for a green card may proceed to get a green card on their own regardless. However, one of the conditions is that the marriage was at least two years old when the U.S. citizen spouse died. People who'd been married for less than two years lost their legal status and their right to a green card.
That basic law remains the same (for now). However, U.S. Department of Homeland Security (DHS) Secretary Janet Napolitano has granted some temporary relief to immigrant widows and widowers (and their children) who were married to U.S. citizens for less than the required two years. She has ordered USCIS to grant them what's called "deferred action" -- a minimal status which mostly means that you won't be deported -- for a period of two years. The idea is to give the immigrants some time to look for ways to resolve their legal status.
If you're an immigrant widow or widower in this situation, seek help from an attorney on both applying for your deferred action status and on taking steps toward a long-term immigration solution. Remember, this deferred action status lasts for only two years -- it's not like having a green card (though you're eligible to apply for a work permit if you can show economic necessity). After the two years are up, USCIS may try to deport (remove) you.