He started going deaf at thirty. The Moonlight Sonata is from that same year.
Beethoven was born in Bonn in 1770. His father, a court singer, wanted a second Mozart badly enough that the neighbours remembered him being pulled out of bed to practise at night. At twenty-one he moved to Vienna and made his name as an improviser — in an age when pianists improvised on the spot, his improvising reportedly made people cry.
In his late twenties his hearing began to fail. In 1801 he admitted it in letters to two friends, saying he had been hiding it for a long time. The following summer, staying in a village outside Vienna called Heiligenstadt, he wrote a letter to his two brothers saying he had thought about ending his life, and that what held him back was the music he had not written yet. He never sent it; it was found in a drawer after his death.
He went on writing for another twenty-five years. At the premiere of the Ninth Symphony he stood on stage unable to hear anything; by contemporary accounts someone had to turn him around before he saw the hall applauding. He died in Vienna in 1827, and the funeral crowd was estimated in the tens of thousands.
He was not the effortless kind of genius. His sketchbooks survive, and you can see the same melody rewritten dozens of times.
Beethoven's pieces often start from something very short — short enough that you would not call it a melody — and then he turns it over and over, pushing it bigger until you cannot forget it.
His other habit is going suddenly quiet. If a passage is building upward and then abruptly shrinks into something almost uncomfortably still, it is usually him.
His music tends to have a shape you can feel: it begins somewhere low and tight, and ends somewhere high and open. That is not a metaphor — he really does write that way, often.