The study found that most non-denominational secondaries offered inadequate religious and moral education (RME) for pupils in fifth and sixth year.
Increasingly, young people in fourth year are also being denied RME, according to the document by the national curriculum body Education Scotland.
It found: "Some young people described their experiences as boring and questioned the value of the subject."
Education Scotland blamed a number of factors, including the subject getting squeezed out by other qualifications and a shortage of specialist staff.
Its report concluded: "This lack of provision potentially has serious consequences for society in that too many young people are not deepening their knowledge and understanding of the diversity of religions and beliefs within Scottish society."
Schools and councils must provide RME to every pupil under the Education (Scotland) Act 1980 - including those in S5 and S6.
Back in 2011, the Scottish Government said: "Children and young people deserve the opportunity to have this taught in a meaningful and progressive way."
A Church of Scotland spokesman said there was a lot of positive work highlighted in the report, but the reduction of RME in some schools was a concern.
He said: "We are pleased to see very good practice in the teaching of RME in many places across the country, but we have real concerns about the way in which RME is being reduced in some schools.
"We will be working with councils, Education Scotland and others to encourage improvements where it is needed."
Dr Stephen McKinney, senior lecturer in culture and faith at Glasgow University, said: "We need to take this report very seriously and think carefully about how we act on it.
"There is an anxiety over the slightly alarming information that there seems to be a lack of support at local authority level for RME teachers and that needs to be addressed."
A spokeswoman for the Scottish Government said: "Schools and local authorities have a responsibility to deliver religious and moral education as a core area within the curriculum, including S4-S6, and we expect them to deliver this."
The report by Education Scotland found most young people in S5 and S6 are missing out on the "important learning" which RME can offer senior students in non-denominational schools.
It added: "In a growing number of schools the curriculum for S4 has either limited or no provision for RME. Occasionally this is also the case from S1 to S3."
Reasons included limited numbers of specialist staff, an inability to recruit extra staff and a lack of the necessary professional training.
The report said timetabling structures were also an issue with "tensions" between the delivery of a range of national qualifications and RME. It added: "Senior managers are often unclear about how they should meet the national expectation."
The report found the situation was different in Roman Catholic schools which were much more likely to embed RME at all ages - partly because of the leadership role played by headteachers.
The report found: "In Roman Catholic schools, headteachers assume direct responsibility for developing the religious life of the school and this usually permeates all aspects of learning and teaching."