[Also available on LinkedIn & Reddit.]
If USCIS does not adjudicate a naturalization case within 120 days of conducting an interview, the applicant has the ability to sue the government in the federal district court where they reside pursuant to 8 USC Sec 1447(b), INA Sec 336(b). Once filed in federal court, the judge may grant or deny citizenship on their own or remand the case back to USCIS with appropriate instructions.
Unreasonable delays in naturalization (N-400) cases that occur pre-interview are not subject to the above laws. However, applicants with long-delays in getting a citizenship interview scheduled can still file a Mandamus/APA lawsuit.