Answer: To answer your first question, a judge may order an evaluation only after some sort of exhibition has caused him to call the person’s competency into question, in. Usually it works to the defendant’s benefit. In regards to the content of emails or texts – an attorney can obtain that information for you.
Question: ”Can a judge legally request a defendant to be diagnosed by a court appointed psychiatrist prior to a criminal trial, in order to establish whether defendant can stand trial? If no, can the defendant refuse such a request? Further, does a defendant in a criminal case have the right of content of text messages/ emails, to prove the alleged victim had fabricated the criminal case?”