No law or rule exists that says you have to file for divorce in the state where your spouse resides. On the contrary, it's the state where you currently live that matters. You can file in Illinois if you meet the state's residency requirements, but if you have children or property, these issues may complicate things.
Illinois law requires that you live within the state for at least 90 days before you can file for divorce there. You could separate from your husband in California in June, move to Illinois, and file for divorce in September. Even if you and your husband lived elsewhere, but he moved to California after you broke up and you moved to Illinois, this rule would still apply.
Jurisdiction Over Your Children
Illinois has adopted the Uniform Child Custody Jurisdiction and Enforcement Act, so if you and your husband have children, and you left them with him in California, Illinois would not be able to address custody issues as part of your divorce. Under the terms of the UCCJEA, the state where your children have lived for the last six months typically has jurisdiction to issue orders affecting them.
If your spouse has never set foot in Illinois, this could hinder the court's ability to award you child support, alimony or property as part of your divorce. The court needs jurisdiction over your husband to decide these things, so if he never lived there or established some other legal link with the state, such as owning a business or property, an Illinois court can only grant you a legal divorce. It can't obligate him to do anything financially.