Prophet Sulaiman (alayhis salam) was the son of Dawud (alayhis salam). As you already know, Sulaiman was very just even as a young boy, and he became well known and respected for his wisdom.
When he became a man, Allah made him His prophet. Allah also taught him to understand the languages of birds and animals.
Yet in spite of his wisdom and many wealthy possessions, Sulaiman (alayhis salam) never forgot Allah. He knew that all goodness comes from Allah.
Thus, he always told his people: "Thank Allah for the good He has given you and for His generosity. Worship Allah and do good deeds."
Once, Sulaiman (alayhis salam) and his soldiers were passing through a valley inhabited by ants.
Sulaiman (alayhis salam) heard one ant say to another: "Quick, get out of the way and hide! Sulaiman (alayhis salam) and his soldiers are coming, and they will trample on us and not even know they have done so!"
Sulaiman (alayhis salam), of course, was able to understand the ants' language. He laughed and ordered his soldiers to stay still and wait until all the ants had crawled away to safety.
Then he prayed to Allah:
"O Allah, help me in doing the right things so that You will be contented with me."
One day, Sulaiman (alayhis salam) called all the birds to gather round him, but as he glanced through the flock, he noticed that the Hoopoe bird was not there.
Sulaiman (alayhis salam) waited for some time, and just as he was deciding not to wait any longer, the Hoopoe suddenly came flying in and sat himself down next to Sulaiman.
"I have come from a far-away city called Saba (Sheba)", the Hoopoe said. "The people there are very rich and they have a Queen who sits on a magnificent throne.
These people worship the sun and believe that hey are right to treat the sun as God. But they are wrong, are they not? They will never find the right way to Allah if they go on like that. Allah is the only One Whom all creatures should worship."
Sulaiman (alayhis salam) then wrote a letter to the Queen of Saba and sent the Hoopoe to take it to her.
When the Queen of Saba received the letter, she called all the wise men of the city to her.
"I have received a letter from Sulaiman (alayhis salam)" said the Queen. "In it, Sulaiman (alayhis salam) writes that we should believe in Allah and worship only Him. What would you advise me to do?"
We are very powerful and can make war against Sulaiman (alayhis salam), but you have to decide yourself what is to be done, the wise men answered.
"But a war could cause destruction to our city, and our best warriors will turn into cruel fighters", the Queen protested. "Therefore, I would prefer not to make war. Instead, I will send Sulaiman (alayhis salam) a present".
When the messengers of the Queen of Saba arrived with the present, they were very surprised because Sulaiman (alayhis salam) became very angry.
"Why do you bring me these riches instead of listening to my advice?" Sulaiman (alayhis salam) scolded.
"What Allah has given me is much better than all these riches. Go to your Queen and take her presents with you!"
When she heard the Sulaiman (alayhis salam) had refused her valuable gifts, the Queen of Saba, in her turn, was surprised. So, she decided to go to see Sulaiman (alayhis salam) for herself.
She called her people and made preparations for the journey to Sulaiman (alayhis salam)'s city.
When the Queen arrived, Sulaiman (alayhis salam) explained to her about Allah and she realized how wrong she had been to worship the sum.
"You are right", she told Sulaiman (alayhis salam), "From now on, I shall worship only Allah. He is our only Lord and we should obey only Him".