There are a couple ways to tell.
Size and temperament - One way we know is because Drogon has always been the favored one as far as which one Daenerys chooses to ride. Part of it was his more aggressive, dominant personality. He is also the one who seemed to sense when she was in danger when they re-opened the fighting games and came to her aid. Her warg-ish bond seems to be the strongest with Drogon. She always rides him, and not the others.
He was also the only one roaming free while the other two were chained underground in Meereen. The history of dragons in this world has established, undisputed, that confined dragons do not grow and thrive as unfettered ones do. When the fleet is burned in Slavers Bay, and Rhaegal and Viserion break out and join Drogon, you can see they are tiny, in comparision. They obviously have grown, a lot, since being freed, but Drogon is still physically the largest.
Coloring - The coloring of the dragons, like the eggs they hatched from, are all different.
Drogon - Black with red markings.
Rhaegal - Green with bronze markings
Viserion - Pale with gold markings
Daenerys Dragons Differences Drogon, Rhaegal, Viserion - Refinery29