Don't interpret "the tropics" with such scientific precision.
You originally posted this question on the Earth Sciences site, and you seem to have been thinking of this quote with a literal (I'd even say pedantic, noting that I consider this a compliment) interpretation of the word "tropics". But in everyday English, the word isn't always used so precisely - I'd wager most English people aren't aware even today that the tropics refers specifically to the region between 23°N and 23°S, and that was probably even more true in the days of the British Empire when people travelled less and knew less about the world beyond their own country.
A tropical climate is characterised as one that's both hot and humid. This is another potential meaning of "tropics" (short for "tropical climates"), which may include regions above the Tropic of Cancer or below the Tropic of Capricorn. However, the climate of Afghanistan is hot and dry, so this definition doesn't strictly work either.
But, checking the quote again:
He has just come from the tropics, for his face is dark, and that is not the natural tint of his skin
... the important point about the region is not its latitude, nor its humidity, but its temperature and the intensity of the sun, which cause people to become tanned. While "tropics" doesn't actually cover Afghanistan, it probably does cover most places in the world with the most intense tan-inducing heat and sunlight. "Tropics" will do as a catch-all term. Even a precise intellect like Holmes's (or Doyle's) doesn't need to split hairs when it's not necessary.
I can't find any specific information on how the word "tropics" was generally used in the late 19th century, but it seems plausible that it was used more loosely than today, in an era when many "foreign parts" could be bunched together as "the colonies" and mostly ignored by Englishmen. It may be worth noting that the Köppen climate classification was first published in 1884, after the time of "A Study in Scarlet", so "tropical climate" may not have been defined at all at this time except vaguely as something like "hot parts of the world".