Although West Virginia allows this, State ex rel. Hamstead v. Dostert, 173 W. Va. 133, 139, 313 S.E.2d 409, 415–16 (1984), my understanding is that it is an extreme outlier.
Prosecutorial discretion is generally treated as sacrosanct, and judges are loath to get involved in second-guessing those decisions. From what I can see, no state has ever endorsed Hamstead.
There are, however, many states that allow citizens to initiate proceedings directly by presenting a probable-cause affidavit to a judge or other magistrate. I've seen this in Ohio and Virginia, and I understand that it is possible in many other jurisdictions, as well.