A sermon was a lecture of a theological nature, given by member of a religious institution.
In 2371, Tom Paris compared his father's annual talk about the prime directive to a holiday sermon and added, he had tuned out most of his sermons years ago. (VOY: "Time and Again")
In 2375, Ranjen Telna gave a sermon about the importance of forgiving people in the Bajoran temple on Deep Space 9. Kira Nerys considered the sermon "very moving". (DS9: "Covenant")
In 2376, The Doctor, playing the role of Mulligan in the Fair Haven holoprogram, gave a lengthy sermon in St. Mary's Church about a dispute between two farmers. Grace Declan then saw him disappear after the Sunday sermon, which made her believe he was spirit folk. When Mulligan later argued against imprisoning Paris and Harry Kim in the church, Seamus answered that despite his "rousing sermon" he wouldn't find many listeners. (VOY: "Spirit Folk")