First Kings 11:1-3 indicates that King Solomon had hundreds of wives and hundreds of concubines, many from lands of which God had previously instructed the Israelites to avoid intermarrying. God knew that such intermarrying would lead to the worship of false gods. Why, then, did Solomon do this?
History reveals that Solomon was very aggressive in his foreign policy. In sealing treaties in ancient days, it was customary for a lesser king to give his daughter in marriage to the greater king (in this case, Solomon). Every time a new treaty was sealed, Solomon ended up with yet another wife. These wives were considered tokens of friendship and "sealed" the relationship between the two kings. It may be that Solomon was not even personally acquainted with some of these wives, even though he was married to them.
In the process of doing all this, Solomon was utterly disobedient to the Lord. He was apparently so obsessed with power and wealth that it overshadowed his spiritual life and he ended up falling into apostasy. He worshipped some of the false gods of the women who became married to him.
Moreover, in marrying more than one woman Solomon was going against God's revealed will regarding monogamy. From the very beginning God created one woman for one man (see Genesis 1:27; 2:21-25). Deuteronomy 17:17 explicitly instructs God's people not to "multiply wives." So Solomon sinned in two ways -- (1) he engaged in polygamy, and (2) he violated God's commandment against marrying pagans, which ultimately led to his own apostasy.