Logical thinking is the ability for a person to make calculations, reasoned arguments, and operations which can be applied to a number of practices and phenomena in everyday experience. The applications of logical thinking are many and these extend from basic thinking skills to more complex analyses in many disciplines. Logic begins with cause and effect thinking as well as syllogisms. For example: I am human; All humans breathe oxygen; Therefore, I breathe oxygen. Logic is used in these basic and complex ways of making sense of the world. It is a science based on empirical phenomena and reasoned (thinking) calculations.
One could easily make the case that political discourse has become less and less logical (policies based less and less on factual observations of society and the economy). That political discourse therefore has become more ideological (policies based more on preconceived notions of the function of government). If one accepts this as fact, then a political debate on prayer in schools is necessarily illogical. And until this problem with political discourse is fixed, any decision on prayer in schools, or any other policy put into practice, will be based on illogical analysis. This is not a failure or limitation of logical analysis. It is a failure in discourse. Many political arguments have been guided too much by ideology and therefore have not been solved by logical analysis.
But such an argument could be solved if the discussions were logical. For example, arguments for either side would need to provide empirical and logical evidence that prayer in schools is practically, personally, and sociological beneficial. An argument for either position would be complicated, but there must be a reason beyond the ideological or religious argument to support or oppose prayer in schools. Simply instituted as an ideological policy is not a logical enough argument. So, to answer your question, a lot of hotly contested political debates are often not settled by logical analysis because ideology unfortunately conditions the arguments.
Since the debate is basically split (black and white) these days, common ground is repelled by both sides. Prayer in schools has become an ideological debate. Until that changes, it will not be solved by logical analysis.