The moral lesson of The Little Prince is that love is all-important and allows us to truly see to the heart and beauty of all things.
The Little Prince leaves his rose because her behavior becomes too difficult for him to bear. He wanders the galaxy and arrives on earth. While there, he sees a house covered in roses just like the rose he left behind on his tiny planet. This fills him with despair, because his rose had always told him she was unique in all the world. Now he sees that she is completely ordinary.
However, the Little Prince also meets the fox, who teaches him that what makes his rose unique is the love he felt for her. He "tamed" the rose by entering into relationship with her, just as he enters into relationship with the fox, "taming" and creating a bond with him.
The Prince realizes he was wrong to leave the rose and that what he saw as her impossibly difficult behavior arose out her vulnerability and need. He addresses all the other roses, stating,
But my rose, all on her own, is more important than all of you together, since she's the one I've watered. Since she's the one I put under glass, since she's the one I sheltered behind the screen.
Actively caring for another creates love and infuses the beloved object with meaning. When the Little Prince realizes this, he decides to sacrifice himself by being bitten by the snake and dying in the hopes it will get him back to his rose.