The Holy Qur’ān declares that there is no compulsion in matters of faith. No one has the right to punish another for rejecting a religion.
Allah states:
لَاۤ اِکۡرَاہَ فِی الدِّیۡنِ ۟ۙ قَدۡ تَّبَیَّنَ الرُّشۡدُ مِنَ الۡغَیِّ ۚ فَمَنۡ یَّکۡفُرۡ بِالطَّاغُوۡتِ وَ یُؤۡمِنۡۢ بِاللّٰہِ فَقَدِ اسۡتَمۡسَکَ بِالۡعُرۡوَۃِ الۡوُثۡقٰی ٭ لَا انۡفِصَامَ لَہَا ؕ وَ اللّٰہُ سَمِیۡعٌ عَلِیۡمٌ
There should be no compulsion in religion. Surely, right has become distinct from wrong; so whosoever refuses to be led by those who transgress, and believes in Allah, has surely grasped a strong handle which knows no breaking. And Allah is All-Hearing, All-Knowing.(Quran 2:257)
But there is punishment for apostasy in the Bible.
The Book of Deuteronomy relates:
If your very own brother, or your son or daughter, or the wife you love, or your closest friend secretly entices you, saying, “Let us go and worship other gods” (gods that neither you nor your ancestors have known,
gods of the peoples around you, whether near or far, from one end of the land to the other),
do not yield to them or listen to them.Show them no pity. Do not spare them or shield them.
You must certainly put them to death. Your hand must be the first in putting them to death, and then the hands of all the people.
Stone them to death, because they tried to turn you away from the Lord your God, who brought you out of Egypt, out of the land of slavery. (Deuteronomy, 13: 6-10)