According to some beliefs, House Targaryen carries the trait for insanity in its bloodline, often referred to as madness.
Some Targaryens appear to be born mad. Others may not display madness when they are younger but can develop it as the years go by, especially when circumstances encourage it, such the Defiance of Duskendale which affected Aerys II Targaryen very deeply.
Ser Barristan Selmy had a notion of this "taint" and chose to observe Daenerys Targaryen in the guise of Arstan Whitebeard, to make sure she did not display any sign of this "taint" before revealing himself and pledging his sword to her. When he says that he can see no taint in her, Daenerys bristles. Ser Barristan tries to explain diplomatically what he means by saying to Daenerys:
I am no maester to quote history at you, Your Grace. Swords have been my life, not books. But every child knows that the Targaryens have always danced too close to madness. Your father was not the first. King Jaehaerys once told me that madness and greatness are two sides of the same coin. Every time a new Targaryen is born, he said, the gods toss the coin in the air and the world holds its breath to see how it will land. 
Up until this point Daenerys Targaryen was aware that her father was called The Mad King - but she thought that it was a lie. She had no idea the extent of her father’s insanity or that this trait ran in House Targaryen.
This new-found knowledge of the alleged madness in her bloodline concerns her. After hearing and seeing Quaithe standing under the persimmon tree, in the terrace of the Great Pyramid, she thinks about Ser Barristan Selmy's warning that in the blood of the dragon there is a taint. She wonders briefly to herself if she is going mad. However, she most likely did see a reflection of Quaithe cast with the help of a glass candle, used by her for communication and clairvoyance 
The Targaryen propensity for madness is known in Essos. Although he is relying on rumor the Windblown's Books thinks Daenerys Targaryen both murderous and mad, saying that her father was mad too, stating:
It runs in the blood.
This comment worries Prince Quentyn Martell as he is all too aware of the madness than runs in the Targaryen line. Quentyn thinks to himself that King Aerys II had been mad, all of Westeros knew. He had exiled two of his hands and burned the third. Quentyn has his apprehensions about Daenerys's personality, and worries:
If Daenerys is as murderous as her father, must I still marry her? 
Prince Doran had never spoken of that possibility to Quentyn.
In Westeros, during a small council meeting in the Red Keep's throne room concerning the Targaryen pretender, Kevan Lannister mentions that there is a second Targaryen, and one whose blood no man can question: Daenerys Stormborn. Mace Tyrell immediately declares she is,
As mad as her father. 
Ser Kevan replies that mad she may be, but with so much smoke drifting west, surely, there must be some fire burning in the east.
Much later Arianne Martell’s thoughts turn to the distant dragon queen Daenerys Targaryen - the TargaryenTargaryen whom her father is pinning his hopes on. The woman whose brother died in front of her, killed by her Dothraki husband who crowned him with a pot of molten gold while she watched and did nothing to save him, all that remained to her of her own blood. Arianne remarks to Ser Daemon Sand that,
"She is the Mad King's daughter," … "How do we do know --"
Ser Daemon gives Arianne an honest reply,
"We cannot know," ... "We can only hope." [that Daenerys does not have the taint]
Dreams and dragons
The Targaryen's prophetic dragon dreams could also try the sanity of the dreamer, also the yearning for bringing dragons back to life. Aerion Targaryen died drinking a cup of wildfire, believing it would transform him into a dragon.
- King Maegor I Targaryen
- King Baelor I Targaryen
- Prince Rhaegel Targaryen
- Prince Aerion Targaryen
- King Aerys II Targaryen
- Viserys Targaryen - driven mad according to his sister. Sounding half-mad according to Tyrion Lannister.
- Queen Helaena Targaryen - named mad by one source thus far - Archmaester Gyldayn. More likely suffering from clinical depression, due to witnessing the murder of her eldest son, eventually resulting in suicide.
It must be observed that of the Targaryen kings who ruled Westeros for almost 300 years, only Aerys could be considered truly mad. Several princes and bastards of Targaryen blood comitted insane acts for one reason or another, and oftentimes it was not "pure madness" but acts born of desperation or arrogance that lead to further tragedies as the tragedy at Summerhall. There is magical power in the blood of old Valyria and this may create a certain instability in a Targaryen's personality, but it could also be that this is due to the fact that the Targaryens have forgotten how to control it when magic waned from the world and dragons disappeared.