One way to read the story is as a critique of capitalism and the class structure. The people the Happy Prince tries to help are representative of particular segments of late Victorian society; there is the seamstress, who labors over her embroidery and cares for her sick child; then the student, who cannot finish his play for want of food and fire; lastly, there is the match girl, who has ruined the matches she is made to sell by her abusive father. Each person is victimized by class structure in that their labor is not valued. The seamstress's work is not appreciated by the lady for whom she labors; the student's work is not appreciated by the director of the theater; the match girl's labor is rewarded with punishment from her parent. However, despite the Prince's sacrificial acts of charity, the lot of the poor is not materially changed; when the Prince asks the swallow to fly over the city and tell him what he sees, the swallow sees that the people are still hungry and in need of shelter. Even though the Prince gives everything, making himself ugly in the process, all he achieves is his own destruction. As the professor says, "As he is no longer beautiful he is no longer useful."
The story does not offer a solution to the problem of social class. The sacrifices of the Prince and the swallow, while noble, do not change things much. In fact, the Professor's statement suggests that the purpose of the Happy Prince, and of art, is to be "useful," presumably in the sense that the beauty of the Happy Prince served as a distraction and justification for the inequalities of the class system.
The story "The Happy Prince" first appeared in The Happy Prince and Other Tales, a collection of children's stories by Oscar Wilde, published in May 1888. Although best known for his delightful drawing room comedies, this story blends fantasy and reality to show Wilde's more serious moral concerns.
The real elements of the story are income inequality and the lack of concern of the rich and powerful for the suffering of others, such as the woman only concerned about her ball gown rather than about the seamstress, or the Councillors concerned about self-aggrandizement rather than about helping the poor. The fantasy elements represent hope and charity. The Prince himself in life was not necessarily a bad person, but not a saintly one; as a gold statue he develops not only wisdom, but true moral goodness that is manifest in his willingness to sacrifice himself for others. His moral goodness also eventually inspires the sparrow to a similar transformation.
Although the talking statue and sparrow are fantasy elements, they exemplify the moral ideals of the story.