The definitive work on Molech is John Day's Molech: A God of Human Sacrifice in the Old Testament (Cambridge U. Press). Molech (Ugaritic Mlk) was probably a Canaanite god of the underworld, whose cult was situated in locales associated with the rephaim (the spirits of the dead). In the case of Syria and the northern Transjordan, Bashan was such a place associated with the underworld and the city of Athtart (= the biblical Ashteroth-Karnaim) was the seat of Mlk (KTU 1.100 R 41, 1.107 V 42), and Mlk ("king", possibly vocalized as Milku) was likely the same as "Rapiu the king of eternity" who is the "god who dwells in Athtart and the god who judges in Edrei" (KTU 1.108 R 1-2). Rapiu (rp'u) and rephaim (rp'um) are the same basic word, the latter occuring in the plural. In the OT, Og was the "king (mlk) of Bashan, one of the remnant of the rephaim, who dwelt in Ashteroth and Edrei" (Joshua 12:4; cf. 13:12), a striking parallel to KTU 1.108 R 1-2. Ashteroth was also associated with rephaim in Genesis 14:5. Within Judah, the Mlk cult was localized in the valley of Hinnom (2 Kings 23:10, Jeremiah 32:35), which is the northern end of the "valley of the rephaim" (Joshua 18:16; cf. 15:8, 2 Samuel 5:18, 23:13, Isaiah 17:5). Amos 5:25 LXX (quoted in Acts 7:43) also associates Molech with "your god Rephan" (= Rapiu of the rephaim?). The idea probably was that Hinnom and its adjoining valley are representations of Sheol, descending at a depth from the heights of Mount Zion, the habitation of Yahweh; in a similar way Bashan could represent the depths across from the heights of Mount Hermon, El's divine habitation. So in Isaiah 57:9 we are told that "with oil you made yourself look your best for Molech, lavishing your scents, you sent your envoys far afield, down to Sheol itself", and in Proverbs 9:18 we are told that the rephaim are gathered in the "valleys of Sheol" (cf. 2:18), valleys that may well have their analogues in Hinnom and its adjoining valleys. This concept is the obvious precursor of the post-exilic notion of Gehenna as the locale where the dead are punished with eternal fire. The idea of Molech as a god of the underworld may even have a late vestige in the Quran which names Maalik as the angel of Jahannam (= Gehenna, i.e. Ge Hinnom) who intercedes with Allah on behalf of the damned (sura 43, 77). The Islamic idea is surely derivative of an older Jewish belief of Molech as the king of Gehenna, or Sheol itself. The notion may have an analogue in Revelation in the personages of Death (the rider of the pale horse) and/or Abaddon, with Death (? = Mot, "Death", the god of the Ugaritic underworld) himself being cast into the lake of fire (20:14).
Whether there is a connection with Yahweh or El is an interesting question. We can see that the chthonic Rapiu is called the "king of eternity" at Ugarit, whereas El in the pre-exilic Transjordanian Book of Balaam son of Beor (eighth century BC) builds an eternal house in Sheol (cf. Mot's seat of enthronement in his city Muddy in the underworld in KTU 1.5 ii 13-16). There is a disputed link with the mlk-sacrifice in Phoenician religion, which is associated with Baal-Hammon (= El) and Kronos (= El) in Punic and classical Greek texts respectively. I know of no clear link with Yahweh per se (although of course El and Yahweh were identified in pre-exilic henotheistic Yahwism).