It depends. This may depend on the style of your lawyer and the needs in your case. Sometimes it is important to get into court early to establish temporary orders, and gather facts using traditional legal techniques before using the mediation process.
If you have a choice, PNW Mediation recommends starting mediation at the very beginning of the case, before the adversarial nature of the court system causes things to spin out of control. Finding information necessary to resolve the case and establishing court orders, or rules between the parties (such as parenting time and child support), can be a part of the mediation process. Mediating early typically reduces the cost of legal fees dramatically.
If your case has already been going on and things have heated up, mediation can still be effective at resolving your disputes and preventing your case from ending up in front of some judge who doesn’t know you. This is what mediators are trained for.