There are plenty of magical beings on Game of Thrones, but none are as important as the dragons. Daenerys Targaryen has been tied to her three dragons from the earliest seasons of the show, raising them from eggs to the full-fledged fearsome beasts they are now. The image of Dany riding her dragons is one of the show's most indelible — and now there's another dragon rider: Jon Snow, the newly-revealed Targaryen heir. It's raised the question of who, exactly, has the ability to ride dragons.
The show does seem to be pretty straightforward about who can and can't ride dragons. Until Jon took a ride on Rhaegal, no one had ridden the dragons other than Dany, the Mother of Dragons herself. Targaryens, who have always been magically connected with dragons, are the only people able to ride a dragon. In a behind-the-scenes featurette for the first episode of the season, showrunner David Benioff makes that perfectly clear.
"No one's ever ridden a dragon except for Dany," he says. "Only Targaryens can ride dragons, and that should be a sign for Jon. Jon's not always the quickest on the uptake, but eventually he gets there."
In the books, however, the ability to ride dragons is a little more widespread. It's not Targaryen blood that makes it possible, but any of the houses of Old Valryia. Of course, in the books, the Targaryens are supposedly the only survivors of the Old Valryian houses, making this point somewhat moot. For the most part, it's Targaryens who are associated with dragons; even their sigil is a dragon.
The bigger question is who, exactly, knows these rules about dragon riding. It appears that Dany isn't actually aware of the Targaryen-only rule: after all, she invited Jon to join her on a dragon ride thinking he was a Stark, and she made an offhand comment that "nobody [knows how to ride a dragon], until they ride a dragon." That would seem to imply that either the rules are different from what we've been told, or that Dany is simply unaware of them. In general, though, it seems like a pretty safe bet that, at least for the purposes of the show, Targaryen blood translates to dragon riding, full stop.