Solomon was the son of David, the third real king (not a judge) of Israel. Solomon committed many sins in his life time such as having more than one wife. In fact he had 700 wives. Another sin was that his wives were not godly women. The law also said kings were not supposed to accumulate huge amounts of wealth, or lots of horses and cattle, but Solomon did both.
In the beginning of his reign God appeared to him and said he would give him one gift. Instead of asking for wealth or power like most kings would he asked for wisdom so that he could rule his people wisely. God gave him this and he also gave him lots of wealth.
Sadly Solomon committed many sins so God said he take away the crown from his family but for the sake of his father David he would not do it while Solomon was alive. God gave the crown to Jeroboam his servant.