Criminal procedure Act 2011, s 326
If you are in prison, then you don’t have the right to be at the court to present your case, but you can apply for permission to be there (“leave to appear”). Sometimes an appearance may be by audiovisual link.
You have the right to present your case in writing if you are not given permission to attend in person.
You’re not entitled to be present if you’re appealing about some procedural issue before your trial, or if you’re appealing against a decision to refuse you bail.