He did not tell his parents because they most likely would disapprove. Hanna was more than twice his age; he enjoyed his relationship with her so much that he was afraid that if his parents found out, they would forbid him from going to see her. He probably also didn't want her to get into any trouble, so keeping it from them seemed the best thing at the time. Also, I don't know if you noticed, but Michael isn't super close to his parents. He seems to be a bit contentious with his father, and both of them are rather distant. They have a very aloof relationship, so it isn't like they are all best pals or anything.
The reason he didn't tell his friends was probably because he enjoyed having a separate, secret life away from them. Also, word would spread, and it could get back to his parents. If they, or his teachers, knew he was often skipping school to be with Hannah, there would have been serious consequences. Telling one friend would have ended up in lots of people knowing; girls his age would think it was weird and wrong, and parents and teachers would have gotten him in trouble and ended the relationship.
I hope that those thoughts help; good luck!
The simple answer is that he knew that if anyone found out about his relationship with Hannah, he would get in trouble. He keeps Hannah secret because he is afraid.
If you think a little harder about Michael's character, however, you might be able to find other reasons besides fear for being so secretive. There is a certain fairy tale–like quality to his relationship with Hannah, the woman who initiates him into sexuality in exchange for being read to. There is a sense that this private world can exist only because of its secret nature: to tell would be to break the spell.
There is another sense in which Michael's not telling is, perhaps, the choice that defines the person he grows up to be. His silence about Hannah as a fifteen-year-old is parallel to his silence about her when he finds her on trial as a war criminal years later.