A process of elimination may be needed to whittle down the options. First - does the Bible speak of any window in heaven through which the torment of those in hell may be viewed?
- Revelation 14:10-11 is a prophetic vision of future events where certain ones suffer hell. But note who are eye-witnesses:
"...he shall be tormented with fire and brimstone in the presence of
the holy angels, and in the presence of the Lamb: And the smoke of
their torment ascendeth up for ever and ever: and they have no rest
day or night, who worship the beast and his image, and whosoever
receiveth the mark of his name." (A.V.)
No humans see this. It is an event in the realms of spirit, and only holy angels and the Lamb (the glorified, resurrected Jesus Christ) witness the torment of those evil ones. Then we learn that it is the smoke of their torment that arises continuously in the presence of those angels, and the Lamb. It is not the ones in hell who are thereafter seen, but the smoke that arises. This, therefore, is not a window into hell; it's more like an outlet for the smoke arising out of hell.
- Luke 16:19-31 has Jesus describing what happens to two men who die. A rich man dies, his body is buried, then Jesus says of him:
"And in hell he lifted up his eyes, being in torments, and seeth
Abraham afar off, and Lazarus in his bosom." (vs. 23)
It's the other way around. From hell, this man can see the bliss enjoyed by the dead but now rejoicing Lazarus, in a place of comfort and joy with Abraham. A great chasm lies between hell and what is called "the bosom of Abraham" (vs. 26). There is no hint that Lazarus can look into hell from where he is.
This means that we can eliminate the Bible as the source of this idea.
What about Dante's Inferno as the source? Roman Catholic Dante Alighieri produced his epic philosophical poem (around 1308-1321) graphically depicting a guided tour of hell, but as far as I know, this all happens in hell itself, and is not seen from heaven. Dante borrows from several sources, including Muslim beliefs about hell.
Does this mean that Islam is the source? Not according to the Qur'an. There is only one verse in it (Surah 17:1) saying Muhammed was taken on a white winged donkey-like beast (a buraq) to Jerusalem. Every year Muslims celebrate this at the feast of Lailat al-Miraj on the 27th of Rajab. This is the 'night journey' where tradition asserts he then ascended to heaven and had visions of the afterlife. He is shown the site of hell and sees the torments of different categories of sinners before the flames drive him back then the lid clangs inexorably over the pit. So, there's no mention of windows in heaven looking into hell either in the Qur'an or in the Hadiths (which, to the contrary, speak of a lid covering over the pit.)
This means we can eliminate the Qur'an as the source of this idea.
However, if the idea emerged out of folk-lore which had taken those slight mentions of hell and embellished them (distorted them, really) then you are unlikely to ever find the origin, the source. Wherever superstition grips the people, you will find fertile soil for seeds of imagination and story-telling only loosely based on what the Bible actually states about heaven and hell.
(P.S. Comments on this site are not for running commentaries; they're for ideas as to how an answer might be improved. The site 'Tour' at the bottom of this page, l.h.s., shows how this site is different to others in this regard.)