It really depends on how she became illegal.  If she entered the US unlawfully and no one had ever filed a petition on her behalf prior to April 30, 2001, under the current immigration laws she is not eligible to legalize her status within the US.  She would have to go back to her home country to consular process for an immigrant visa but as soon as she departs the US, she automatically triggers a 10 year bar to reentry, which can only be waived by a showing of extreme hardship to a US citizen spouse, which is fairly difficult in most cases.If she entered the US lawfully but has since overstayed her authorized period of stay, she can legalize her status within the US, but only on the basis of a bona fide marriage to a US citizen.