If I’m understanding your question, you are basically asking if there is a connection between IDOLATRY and HOMOSEXUALITY. The answer is: Yes, the Bible does teach that “idolatry can lead to homosexuality.” But as we shall see, idolatry is really the sin that leads to all forms of sin.

Let’s read 1st Kings 15:11-12: “Asa did what was right in the eyes of the LORD, as did David his father. And he took away the SODOMITES out of the land, and removed all the IDOLS that his fathers made” (KJV). The word “sodomites” (another word for “homosexuals”) is translated “male cult prostitutes” in the NASB and “perverted persons” in the NKJV. This “sexual perversion” was indeed part of the “idol worship” that was practiced in many heathen lands, for these “temple prostitutes” actually committed their acts of sexual perversion inside the heathen temples. How sad it is to see that when Israel declined spiritually, they fell into idolatry and these sexual perversions. How good it is to see when Israel was under the leadership of a godly king like Asa, idolatry and male prostitution was banished from the land.

Now let’s turn to a key passage in the New Testament which makes this same connection of IDOLATRY and HOMOSEXUALITY. I’m speaking of Romans 1:18-28, which I will now quote in full. “For the wrath of God is revealed from heaven against all ungodliness and unrighteousness of men, who suppress the truth in unrighteousness, because what may be known of God is manifest in them, for God has shown it to them. For since the creation of the world His invisible attributes are clearly seen, being understood by the thing that are made, even His eternal power and Godhead, so that they are without excuse, because, although they knew God, they did not glorify Him as God, nor were thankful, but became futile in their thoughts, and their foolish hearts were darkened. Professing themselves to be wise, they became fools, and changed the glory of the incorruptible God into an image made like corruptible man—and birds and four-footed animals and creeping things. There God also GAVE THEM UP TO UNCLEANNESS, in the lusts of their hearts, to dishonor their bodies among themselves, who exchanged the truth of God for the lie, and WORSHIPED AND SERVED THE CREATURE rather than the Creator, who is blessed forever. Amen. For this reason God GAVE THEM UP TO VILE PASSIONS. For even their women exchanged the natural use for what is against nature. Likewise also the men, leaving the natural use of the woman, burning their lust for one another, men with men committing what is shameful, and receiving in themselves the penalty of their error which was due. And even as they did not like to retain God in their knowledge, God GAVE THEM OVER TO A DEBASED MIND, to do those things which are not fitting” (NKJV).

In this passage we learn that once men (and women) turn from the knowledge of God through creation and worship the “creature rather than the Creator” (which is what IDOLATRY really is), they will sink lower and lower into sin and degradation. Men speak of “evolution” and how men are “EVOLVING into a higher state of being,” but in reality, men are “DEVOLVING into a lower state of being.” In this passage we see them worshiping images of men, birds, animals, and creeping things; which means their worship goes down to the lowest forms of creatures. And then we see them sinking into the lowest forms of sexual perversion by changing the natural use of their bodies, women having sexual relations with women, and men with men. This, dear friend, is what can happen in any society where the knowledge of God is GIVEN UP, for when this happens God GIVES THEM UP to their vile passions. What this means is God removes His holy restraint upon men and allows them to sink lower and lower into human depravity, a depravity that He will one day judge in holy wrath “against all ungodliness and unrighteousness of men, who suppress the truth in unrighteousness.”

In closing, I had said at the beginning that “idolatry is the sin that leads into all forms of sin.” We see this as we read on in verses 29-31, “Being filled with all unrighteousness, sexual immorality, wickedness, covetousness, maliciousness; full of envy, murder, strife, deceit, evil-mindedness; they are whisperers, backbiters, haters of God, violent, proud, boasters, inventors of evil things, disobedient to parents, undiscerning, untrustworthy, unloving, unforgiving, unmerciful.” Sexual immorality (fornication, adultery, homosexuality) is in this list, but giving up the knowledge of God the Creator and worship the creature is the “root sin” that leads men to debase themselves by committing all conceivable forms of sin.  (DO)  (555.1)