Mediation is voluntary. However, if you unreasonably refuse to mediate, the courts may not award you your legal costs after a trial.
Mediation is a voluntary process. However, under the Civil Procedure Rules, an unreasonable refusal to mediate could mean that courts might make an adverse legal costs award against you at trial (even if you win). This would mean that whilst you may still win in court, you may not be able to recover all of the legal costs that you have spent on your case and/or be forced to pay the costs of the other party. The reason for this is that the courts think it is important that parties attempt to settle any case, before they come to court.
More positively, mediation gives the opportunity to avoid the stress, time and cost of going to court, as well as finding a solution that you have chosen. The worst that can happen at a mediation is that you do not find a resolution and you are at the same position as you were before you mediated.
You should always seek legal advice on what refusing to mediate may mean for your specific dispute.
You can read more about when is it reasonable to refuse mediation here.