Another question that I realize we probably can’t really answer. However, since I’ve been curious about it for some time, I thought I’d ask anyway. In the Old Testament, we read of Solomon letting his wives turn his heart from God.
“For it came to pass, when Solomon was old, that his wives turned away his heart after other gods: and his heart was not perfect with the Lord his God, as was the heart of David his father” (I Kings 11:4).
Surely this state would have kept him from fellowship with God and in that he would have missed out on a heavenly home. Some teachers seem to think the book of Ecclesiastes may have been repentance from this state.
What would your thoughts be on the subject? Just curious.
We have to keep in mind that we are not in God's judgment seat. The final say in this matter belongs to the Lord. We know Solomon strayed at the end but we don't know if he returned to God before his death. However, this should serve as a warning that a faithful life before God can be marred by sin. "But when a righteous man turns away from his righteousness, commits iniquity and does according to all the abominations that a wicked man does, will he live? All his righteous deeds which he has done will not be remembered for his treachery which he has committed and his sin which he has committed; for them he will die" (Ezekiel 18:24). Great wisdom doesn't keep a man from making foolish mistakes.
I would reject the idea that Ecclesiastes was written as a result of Solomon's repentance. That view hints that books of the Bible were written by the will of man instead of the will of God. "But know this first of all, that no prophecy of Scripture is a matter of one's own interpretation, for no prophecy was ever made by an act of human will, but men moved by the Holy Spirit spoke from God" (II Peter 1:20-21).