I had listened from elders that you should not tell your dreams to someone else, some says that you should not tell your bad dreams, some says never tell your good dreams,please explain according to Quran and Sunah.
The Qur'an teaches us prudence when revealing a dream
After the young Yusuf() told his father Ya'aqub() about his dream the later answered:
He said, "O my son, do not relate your vision to your brothers or they will contrive against you a plan. Indeed Satan, to man, is a manifest enemy. (12:5)
The two young man only revealed their dreams to Yusuf() because they trusted him and thought he might be able to interpret them correctly:
And there entered the prison with him two young men. One of them said, "Indeed, I have seen myself [in a dream] pressing wine." The other said, "Indeed, I have seen myself carrying upon my head [some] bread, from which the birds were eating. Inform us of its interpretation; indeed, we see you to be of those who do good." (12:36)
And so did the young man who survived introduce Yusuf():
But the one who was freed and remembered after a time said, "I will inform you of its interpretation, so send me forth." (45)
[He said], "Joseph, O man of truth, explain to us about seven fat cows eaten by seven [that were] lean, and seven green spikes [of grain] and others [that were] dry - that I may return to the people; perhaps they will know [about you]." (12:45-46)
We must note that Ya'aqub() actually didn't interpret the dream of Yusuf(), so that Allah showed him the true meaning later:
And he raised his parents upon the throne, and they bowed to him in prostration. And he said, "O my father, this is the explanation of my vision of before. My Lord has made it reality. And He was certainly good to me when He took me out of prison and brought you [here] from bedouin life after Satan had induced [estrangement] between me and my brothers. Indeed, my Lord is Subtle in what He wills. Indeed, it is He who is the Knowing, the Wise. (12:100)
As for Ibraheems() dream he and (apparently) his son() considered it a revelation and therefore this might be a bad example of telling a dream, as we know that dreams that come true are part of the prophet-hood and part of the revelation (see for example in Sahih Muslim). See also in the first chapter of Sahih al-Bukhari -and elsewhere in the same source- in a long hadith on the authority of 'Aishah:
"The commencement of the Divine Inspiration to Allah's Messenger (ﷺ) was in the form of good dreams which came true like bright daylight, and then the love of seclusion was bestowed upon him. ... "
The sunnah also teaches some prudence
The Prophet (ﷺ) said, "If anyone of you sees a dream that he likes, then it is from Allah, and he should thank Allah for it and narrate it to others; but if he sees something else, i.e., a dream that he dislikes, then it is from Satan, and he should seek refuge with Allah from its evil, and he should not mention it to anybody, for it will not harm him." (See for example in Sahih al-Bukhari here and here and in Jami' at-Tirmidhi)
The Prophet (ﷺ) said: The vision flutters over a man as long as it is not interpreted , but when it is interpreted, it settles. And I think he said: Tell it only to one who loves (i.e. friend) or one who has judgment.
(See for example in Sunan abi Dawod, other sources are quoted in What is the relationship between Ilham and leg of a bird?)
“Interpret them (dreams) in accordance with the names of the things you see, and understand what is hinted at, and the dream is for the first interpreter.” (See in Sunan ibn Majah, qualified as da'if)
So both the Qur'an and sunnah tell us to be prudent and not to tell a dream only to a person we trust especially if we are expecting an interpretation we should only ask a person we trust and we know is able to interpret dreams.
The sahabah therefore went to the prophet() to tell him their dreams and expected an interpretation and the hadith of abu Bakr interpreting a dream (see here in Sahih al-Bukhari)shows that abu Bakr had the basic knowledge for that, but nevertheless he might have had some mistakes in his ijtihad of interpretation.
Therefore you must chose the person you tell your dream carefully! But basically you are allowed to tell it to whom you want.
In the light of Quran it is confirmed that you can tell your dreams to people:
Ibrahim (A.S) and his son (A.S)
And, when he (his son) was old enough to walk with him, he said: "O my son! I have seen in a dream that I am slaughtering you (offer you in sacrifice to Allah), so look what you think!" He said: "O my father! Do that which you are commanded, Insha' Allah (if Allah will), you shall find me of As-Sabirin (the patient ones, etc.)." [37:102]
Yusuf (A.S and his father (A.S)
(Remember) when Yusuf (Joseph) said to his father: "O my father! Verily, I saw (in a dream) eleven stars and the sun and the moon, I saw them prostrating themselves to me." [12:4]
Yusuf (A.S) and two young men
And there entered with him two young men in the prison. One of them said: "Verily, I saw myself (in a dream) pressing wine." The other said: "Verily, I saw myself (in a dream) carrying bread on my head and birds were eating thereof." (They said): "Inform us of the interpretation of this. Verily, we think you are one of the Muhsinun (doers of good - see V. 2:112)." [12:36]
The King and Yusuf (A.S)
And the king (of Egypt) said: "Verily, I saw (in a dream) seven fat cows, whom seven lean ones were devouring - and of seven green ears of corn, and (seven) others dry. O notables! Explain to me my dream, if it be that you can interpret dreams." [12:43]
And in Hadiths (only few I am mentioning):
Sahih Al-Bukhari, Volume 4, Book 56, Number 818: The Prophet said, "In a dream I saw myself migrating from Mecca to a place having plenty of date trees....
Sahih Al-Bukhari, Volume 5, Book 57, Number 31: The Prophet said, "In a dream I saw myself drawing water from a well with a bucket....
Sahih Al-Bukhari, Volume 2, Book 21, Number 222: Narrated Salim's father: In the life-time of the Prophet whosoever saw a dream would narrate it to Allah's Apostle...
From such hadiths you can even say its Sunnah to tell your dreams to people.
But what you should no do.
You should not tell you bad dreams for It will not harm you.
Sahih Al-Bukhari, Volume 9, Book 87, Number 114: The Prophet said, "If anyone of you sees a dream that he likes, then it is from Allah, and he should thank Allah for it and narrate it to others; but if he sees something else, i.e., a dream that he dislikes, then it is from Satan, and he should seek refuge with Allah from its evil, and he should not mention it to anybody, for it will not harm him."
1Many (not all) wrong conclusions here– Medi1Saif ♦Oct 29, 2018 at 20:27