In The Stranger, Albert Camus presents life in an absurdist light. Absurdism holds that life is meaningless and that the universe, rather than being benevolent or hostile, is indifferent to human life. The struggle between humanity's attempt to find inherent meaning in life and the fruitlessness of that search is a major part of most absurdist art and literature.
In The Stranger, Meursault is one who has accepted the absurdity of life by the end of the novel. He rejects the idea that there is some higher moral order to the universe (represented by the priest who comes to visit him before he dies) or that life has a purpose. Even his murder of the Arab man is something he views as absurd, since he had no motive for killing him. The whole sordid affair is absurd, much like Camus's presentation of existence itself.
Meursault becomes an outsider because of his absurdist philosophy. Other characters believe there is a higher moral order and that everything in life has a rational explanation, such as the people in the courtroom. They are all horrified by Meursault because he represents such an alien view—one that directly challenges their own. So, an additional message of the novel is that the absurdist philosophy is a minority view that most people are unwilling to accept because they crave meaning.