In the original adventures of Sherlock Holmes, written by A. C. Doyle, Dr. Watson served in the second Afghan War.
"The regiment was stationed in India at the time, and before I could join it, the second Afghan war had broken out...I...succeeded in reaching Candahar in safety, where I found my regiment, and at once entered upon my new duties." -A Study in Scarlet. Candahar is another spelling of current Kandahar, a city in Afghanistan.
In the new BBC Sherlock series, Dr. Watson also served in Afghanistan.
So, they're just keeping it true to the book, right?
The amazing thing though is that Sherlock is set in our current times, and there currently is a war with British soldiers participating in it in Afghanistan, if this series had been produced 15 years earlier or later than it was, this statement would have been non-nonsensical. They would have had to substitute the name of a different country or set the show in the past. But they didn't, because there was a war there then, and there is a war there now.