Their Belief in Allah and their Retreat from their People
Allah
نَحْنُ نَقُصُّ عَلَيْكَ نَبَأَهُم بِالْحَقِّ إِنَّهُمْ فِتْيَةٌ امَنُوا بِرَبِّهِمْ
We narrate unto you their story with truth;Truly, they were young men who believed in their Lord (Allah),
From here Allah begins to explain the story in detail.
He states that they were boys or young men, and that they were more accepting of the truth and more guided than the elders who had become stubbornly set in their ways and clung to the religion of falsehood.
For the same reason, most of those who responded to Allah and His Messenger were young people. As for the elders of Quraysh, most of them kept to their religion and only a few of them became Muslims.
So Allah tells us that the people of the cave were young men.
Mujahid said,
"I was informed that some of them wore some kind of earrings, then Allah guided them and inspired them to fear Him, so they recognized His Oneness, and bore witness that there is no god besides Him."
وَزِدْنَاهُمْ هُدًى
and We increased them in guidance.
From this and other similar Ayat, several scholars, such as Al-Bukhari and others, understood that faith may increase, that it may vary in degrees, and that it may fluctuate.
Allah says;
وَزِدْنَاهُمْ هُدًى
(and We increased them in guidance), as He said elsewhere;
وَالَّذِينَ اهْتَدَوْاْ زَادَهُمْ هُدًى وَءَاتَـهُمْ تَقُوَاهُمْ
While as for those who accept guidance, He increases their guidance and bestows on them their Taqwa. (47;17)
فَأَمَّا الَّذِينَ ءامَنُواْ فَزَادَتْهُمْ إِيمَـناً وَهُمْ يَسْتَبْشِرُونَ
As for those who believe, it has increased their faith, and they rejoice. (9;124)
لِيَزْدَادُواْ إِيمَـناً مَّعَ إِيمَـنِهِمْ
that they may grow more in faith along with their (present) faith. (48;4)
There are other Ayat indicating the same thing.
It has been mentioned that they were followers of the religion of Al-Masih `Isa, `Isa bin Maryam, but Allah knows best.
It seems that they lived before the time of Christianity altogether, because if they had been Christians, the Jewish rabbis would not have cared about preserving because of their differences. We have mentioned above the report from Ibn Abbas that the Quraysh sent a message to the Jewish rabbis in Al-Madinah to ask them for things with which they could test the Messenger of Allah, and they told them to ask him about these young men, and about Dhul-Qarnayn (the man who traveled much) and about the Ruh.
This indicates that this story was something recorded in the books of the People of the Book, and that it came before Christianity. And Allah knows best.