This of course is a matter of opinion. My opinion is that O. Henry's main theme woven throughout this touching story is the importance of art in human life. The last leaf that Old Behrman painted on the wall is his masterpiece. It takes great strength of character for the old man to go out there in the freezing weather and stand precariously on a tall ladder while he uses his paints and brushes and all his accumulated artistic skill to create a multi-colored leaf on the brick wall. It is a true work of art because he puts his feelings into his work, and he communicates these feelings to the sick girl named Johnsy, giving her the strength to go on living. Art is something that gives people the strength to go on living in spite of all the "slings and arrows of outrageous fortune." Johnsy herself is an artist. So is Sue. They live in an art colony in New York City. O. Henry was an artist too, and he must have felt that his mission as a writer was to provide amusement, hope, and cheer to the multitudes of struggling humanity. The passage through life is hard on all of us. Writers, musicians, and painters make it a little easier. That's about all. The theme of "The Last Leaf" is all about art--the joys and sorrows of artists and the importance of the sacrifices they make for it. In a very profound book titled What is Art? the great Russian writer Leo Tolstoy has this to say about the subject.
If people lacked this capacity to receive the thoughts conceived by the men who preceded them and to pass on to others their own thoughts, men would be like wild beasts...And if men lacked this other capacity of being infected by art, people might be almost more savage still, and, above all, more separated from, and more hostile to one another. And therefore the activity of art is a most important one, as important as the activity of speech itself and as generally diffused. (Chapter Five)