The Song of Roland is the earliest and most well-known of a series of medieval French heroic epics. Its core message is relatively straightforward: in the world of TSoR, evil will never win out over good. There is a lack of ambiguity in TSoR that differentiates it from, for example, The Iliad, where the horrors of war are presented explicitly. In TSoR, war is a glorious mission which can have heavy costs, but no consideration need be given to the suffering of the defeated. The Franks in the poem represent Good, while the Saracens are straightforwardly Evil. As such, the will of God means that they could not possibly ever have triumphed.
God in this poem is presented as benevolent, all-knowing, and all-powerful—ideas with which the audience would have agreed. In the poem, it is expected that God will dictate the direction of events; for example, Ganelon is tried by combat in the expectation that God will, of course, make the decision by choosing the victor. When bad things happen to the Franks, these are justified as being part of God's overall plan. In this poem, if the Franks are good servants to God as their Lord, they need never fear.
This theme ties in to another important message in the poem: vassalage, or the act of being faithful to one's earthly lord, is a parallel to Christianity. Being a good vassal is imperative. Through serving Charlemagne bravely to the death, Roland enacts vassalage also to his heavenly lord, God. This service protects Roland from harm.
The message of this poem, then, combines strong pagan themes of vassalage, heroism, and fealty with Christian ideals of good, evil, and the all-powerful will of God. While good will always defeat evil, God requires men sometimes to carry out his will for him, and therefore it is through earthly vassalage and adherence to duty that a soldier such as Roland can become even more purely good.
Of course, to the modern reader, there is much that is problematic in this dismissal of the Saracens as pure evil. There is an interesting essay on the OUP blog, linked below, that explores the lessons of The Song of Roland in greater depth.