Michael, after guessing about Hannah's secret, thought quite a bit about telling the judge. At some level though, he wanted to respect Hanna's wishes. For whatever illogical reason that Hannah wasn't telling, he didn't want to violate her decision to not tell. The power to tell was in Hannah's hands, and she wasn't, so who was he to step in and take that power away from her? Ultimately, he put off telling the judge because he wanted to respect Hannah's wishes. However, I feel that is a bit of a cover-up for him just being outright scared. He was a bit of a coward, and ultimately just chickened out.
Michael's father advised him to talk to Hanna, to see if she wanted help, if he might be able to try to tell what was going on to someone. He put it this way:
"One has to leave him the last word, but one must talk to him, to him and not to someone else behind his back."
Michael's father believed that you couldn't put what you thought best above what someone else thought best. So, he advised talking to Hanna and seeing if he couldn't convince her that talking to the judge was best. And, Michael tried to do that also, but chickened out. So, Michael not only chickened out on telling the judge or someone else, but also on actually speaking to Hanna. Part of the reason he was reticent to do so was because he didn't want to expose his relationship; in fact, he didn't give all of the details when he spoke with his father. So, even in speaking to his father, he didn't give the full truth. He was worried about what people might say or think of him--and Hanna--if their relationship was unveiled. People would know that Hannah had been in a a relationship with a 15-year-old boy, and then his father would have known how he had lied so often during that time period.
So, there are lots of reasons that he justified his decision to not help: fear of being exposed for his relationship with her, fear the exposure of the relationship would hurt rather than help her, and wanting to respect Hanna's wishes concerning the matter. I hope that helps a bit; good luck!