Because the prince was constantly happy the courtiers dubbed him "the Happy Prince." He lived in a castle where sadness was forbidden,
so when he was living, he had no idea what tears were. But after he passed away and was turned into a statue, he was unhappy about his city's condition and shed tears.
All the ugliness and despair of the city was visible to him.