God was pleased with Solomon because he asked for discernment to know what is right. When he talked to God, he did not ask for riches or for the life of his enemies.
In addition to giving Solomon what he asked for, God said that there would not be a king like Solomon for many days. He would also give Solomon many riches. He would, also, said that if Solomon obeyed his walk in his ways, and keep his statuses and commands he would give him a long life.
Two prostitutes came to Solomon with a problem. They had a relationship problem, in which only one mother was the mother of a baby. They insisted to split the baby in half, but Solomon was humble about the situation and said that he was not going to kill the baby. Instead, he declared only one of them the mother and the whole nation was in awe.
Wisdom is important because it helps you become a better leader. When you are wise, you make wise decisions and it benefits , not only you, but everyone around you.