The M-theory to understand black holes I am a layman in astronomy. Can someone please explain it to me whether the M-theory can be used to explain what is happening in the centre of the black hole where the singularity exists? Or is it still necessary to peek inside a black hole to gain that information?
Can someone please explain it to me whether the M-theory can be used
  to explain what is happening in the centre of the black hole where the
  singularity exists?


In Layman astronomy - yes, M-Theory (and probably a few string theories) do explain in detail what happens at the singularity, but it's a mathematical construct, not a testable hypothesis, so what it tells you might be wrong and little more than creative but irrelevant mathematics. 

Looking inside a black hole, well, that's not a good idea either.  Even if you were able to see what happened, you wouldn't be able to send a message back telling anyone, so that's also no help.

Quantum physics is all a model anyway, but it's a good model because it provides accurate answers and it predicted the existence of particles that were later discovered.   Relativity is a good model too that stood up to testing.   Good models are useful and highly accurate and provide answers.  

M-theory is a mathematical construct.  That's a different thing entirely.   It could still end up being right, but until it's testable, it's really just a mathematical exercise.   They really shouldn't call it a theory, it should be M-Hypothesis and String-Hypothesis.  They aren't real theories.

If I may quote Shakespeare from Henry IV, just for fun:


  GLENDOWER

I can call spirits from the vasty deep.

  
  HOTSPUR

Why, so can I, or so can any man;
But will they come when you do call for them?



I'm personally much more comfortable with the "both accepted theories, relativity and quantum theory, break down at the singularity, so we don't know what happens".

If you prefer that M-Theory says what happens, preferring that answer is entirely optional, but I think the majority of people in this field are more comfortable with the we don't know answer.