Short version: Sword of Damocles is about religion.
Slightly longer version: Sword of Damocles is about good faith, bad faith, lack of faith, and the how they interact.
Star Trek has a very oddball relationship with religion. Part of this being due to Gene Roddenberry's belief that the universe would be a better place if everyone was irreligious. Obviously, this didn't really go over too well with all of the cast and writers. William Shatner, for example, wanted Captain Kirk to fight the Devil in Star Trek: The Final Frontier. Honestly, it couldn't have made that movie worse.
Ooo, burn! Yeah, folks, I'll be here all night. Actually, I'm probably the only guy who really LIKED that movie but that's beside the point.
There are other examples too of Star Trek being pro-religion: "Bread and Circuses" is a love letter to Christianity and Deep Space Nine is more or less about God. Amusingly, Babylon Five which had four seasons devoted to analogues for angels and demons, was more agnostic than Deep Space Nine.
Still, the trouble with religion is always there. Worse, it leads to some pretty hackneyed plots. Robert Beltrane' s Chakotay was supposedly the first openly religious Star Trek character from an Earth religion. Yet, I say if you can't tell me Chakotay's tribe and what his specific religious beliefs are, he's no more actually Earth religious than Kira Nerys.
There's also been some dumb attempts to reconcile the more religious elements with Gene Roddenberry's vision. For example, trying to have Kira believe in a secular version of the Prophets when Sisko is fighting demons in the Fire Caves before ascending to become Space Jesus.
My own religious beliefs are an irreverent form of Christianity. How irreverent? I like to think Captain Kirk actually killed God in Star Trek: The Final Frontier. Which is ridiculous, I know. What does God need with a spaceship?
Anyway, my real-life faith isn't really relevant save for the fact that I have no trouble dissecting the occasionally strange nature of religion even while believing in God. Religion can lead people to do some positively dumb **** and I have no problem pointing that out. Still, science fiction talks about religion can often end up being heavy handed and problematic. Really, it's the fundamental nature of religion that causes the problem. Either you believe that religion has a place in the lives of human beings or you think it's nonsense.
It's the rare person who believes both and even then, he's not likely to win favor with those who take their belief (or lack there of) in God deadly serious. I think the only book about the nature of faith and its importance I actually enjoyed was Hogfather and that was written by an atheist.
Kudos to Mister Pratchett. You will be missed.
Sword of Damocles, despite not being up with Mister Pratchett's work, handles the issue surprisingly well. I believe this is due to the fact that the authors don't forget to tell a story in the midst of all the parable. On one hand you have the deranged religious fanatics of the week and on the other you have the religious members of the Titan crew. Contrasting this are the secular members of the Titan crew who find both of their views peculiar but respect their right to have them.
The plot suffers from a small aspect, however, which is the fact that it tries to be weird and deep. Honestly, I think it's better to stick with comprehensible and deep or weird and sanity-blasting. The book involves time travel, oddball spatial physics, and plenty of stuff which just complicates the issue of faith versus reason. There's also an obvious "twist" regarding the fate of the U.S.S Titan which is just telegraphed from the very beginning and so easy to figure out you feel sorry for the cast.
The book also ends a relationship I was actually looking forward to reading more about. I won't spoil it but it was something that left me feeling cold as opposed to moved. Call me crazy but I would have appreciated if they'd managed to keep the relationship going through the books indefinitely.
Overall, I very much enjoyed the book but felt the technobabble and oddity of the "final problem" undercut the book's message about religion. Likewise, I missed the interaction between Troi and Riker when they were split up for almost half the book. The book tackled a big science-fiction/real world issue and I applaud that but it was a harder read than I would have liked.