It is said that Beethoven wrote the piano sonata, for one of his pupils, the Countess Giulietta Guicciardi, with whom he had fallen in love. In fact, the piece was dedicated to her. He did propose marriage to her, but her father denied the match, as Beethoven was far below the social station of the young countess and did not have a steady income.
The countess married another and moved away, and the friendship between the two was never resumed. There has been speculation that the piece was really written about a few women who had touched the composer's life, but nothing has been found to cement that theory. For now, the piece remains solely designed around the young Giulietta Guicciardi.
While the sonata was first named “Piano Sonata in C minor, op 27 no.2” it was nicknamed the Moonlight Sonata by Ludwig Rellstab, a German critic who said the piece reminded him of the moon over Lake Lucerne.