If someone files for Naturalization based upon 3 yrs rule of being married to a US citizen for 3 yrs then USCIS ALWAYS demands tons of documents to get convinced that marriage is still happily going on. If USICS would come to know that marriage is shaky or on the verge of divorce or a divorce case is pending then there is no way in this world USCIS is going to approve a naturalization application because US immigration laws don't allow them to approve an application in these situations. Why? Because the rule/law of allowing to file an naturalization application based upon 3 yrs rule is made up for the sole benefit of US citizen and not for immigrants. So if marriage is on the verge of divorcing then an immigrant is not eligible to file N-400 under this rule; rather s/he would need to file under 5 yrs rule whenever s/he would be eligible for it.
Though USCIS don't normally check with family court to know if there is a pending case for divorce but it could be possible. Because when I was practicing laws I came to know some cases wherein USCIS ran the background checks on applicants even with family courts to find out if there was any divorce case pending or any restraining order issued by family court. So, noone can say for sure what USCIS is capable to do these days given all these background checks.
Plus, don't forget that USCIS always demands tons of evidentary documents to prove that applicant is still happily living together with US citizen spouse in the marriage. Just being legally married alone is not enough. I know some people try to dodge the USCIS by producing all these documents even though they are separated from their spouse, but by doing so they are risking their immigration life here because USCIS will revoke their citizenship and deport them whenever they would know the truth even if 100 of yrs later. If someone wants to risk their and their loved ones immigration life then they can do as they feel like doing but don't forget the fact that whenever any application is filed with USCIS, no matter for what benefit, USCIS always requires divorce decree of each person if someone was ever married before. And USCIS do check divorce record. Thus, they could easily find out in the future about when divorce was filed and when parties were separated, which would lead to revocation of their citizenship and deportation. This has happened to many people in the past.
Good luck.