You need at least 5 years with a green card to become a citizen (other people like those in the military can get it faster, but I'm not going to get into those scenarios that don't apply to you). You can send in the application 90 days before the 5 year mark.
Before you become a citizen, you can't file anything that would give her legal status*. And if you marry her before becoming a citizen, you need to list her information on the citizenship form (which could bring her situation to their attention and prompt them to initiate deportation).
*technically, as a green card holder you could file I-130 now, but she still wouldn't gain any legal status until 5 or 6 years later when your priority date is current for the GC spouse category.