An argument has been made that there was no Hindu Afghanistan. This is unfortunately wide off the mark. Afghanistan was not just Buddhist but Hindu and Buddhist and Hinduism was the other major religion of the region besides Buddhism.
The evidence of Hinduism in Afghanistan is quite overwhelming and it begins to appear already during the Indo-Greek period, and continues during the Kushan period, the Kidara, the Hephthalite and the Kabul Shahi period.
The earliest evidence of Hinduism in Afghanistan among the Indo-Greeks is as old as 180 BCE and it comes north of the Hindu Kush for good measure.
The first known bilingual coins of the Indo-Greeks were issued by Agathocles around 180 BCE. These coins were found in Ai-Khanoum, the great Greco-Bactrian city in northeastern Afghanistan, but introduce for the first time an Indian script (the Brahmi script which had been in use under the Mauryan empire). The coinage depict various Indian iconography: Krishna–Vasudeva, with his large wheel with six spokes (chakra) and conch (shanka), and his brother Sankarshan–Balarama, with his plough (hala) and pestle (masala), both early avatars of Vishnu. The square coins, instead of the usual Greek round coins, also followed the Indian standard for coinage. The dancing girls on some of the coins of Agathocles and Pantaleon are also sometimes considered as representations of Subhadra, Krishna’s sister.
Hinduism is also evident in Afghanistan during the Kushan period. The first great Kushan king or emperor was Kujula Kadphises and he never ruled any territory east of the Indus. Yet he is already shown on his coins as a devotee of Shiva.
Contrary to earlier assumptions, which regarded Kujula Kadphises as Buddhist on the basis of the epithet of the ‘satyadharmasthita’ epithet, it is now clear from the wording of a Mathura inscription, in which Huvishka bears the same epithet satyadharmasthita , that the kingdom was conferred upon him by Sarva (Shiva) and Scamdavira (Candavlra), that is, he was a devotee of the Hindu God Siva. It is striking to see that Kujula Kadphises has already adopted the worship of Siva and the use of Kharosthï script at such an early date.
A coin of Vima Kadphises with Shiva standing before a Nandi on the reverse.
Hinduism was either practiced or patronised by all later Kushan emperors but then they were also rulers of much of North India in addition to Afghanistan and parts of Central Asia. The last of the Great Kushans was named Vasudeva. This is as Hindu as it can get.
The Kushans were succeeded by the Kidarites, after a brief interlude when Sassanians captured Kushan homeland Balkh, who claimed descent from the Great Kushans. The Kidarite or the Lesser Kushans, had little political control beyond Indus or Punjab. But they are credited with spread of Hinduism in Sogdiana no less. Have a look at this –
Although largely faded, the once–bright blue colors used to depict the body of the Hindu deity Shiva still dominate this image. Framed by a decorated arch supported by two half-columns, this complex representation of Shiva depicts the deity with a halo, poised in what some scholars believe is either a dancing or an alidhasana stance, with one leg bent at the knee and the other stretched forcefully to the side.
This is a Ganesha statue from Afghanistan which was installed by a king known as Khingila, whose identity is a matter of debate. Scholars speculate that he may have been from the Turki Shahi dynasty but the dating is uncertain and therefore the statue or Murti is dated anywhere between 6th to 8th century CE.
Hinduism lasted in Afghanistan as a major religion right upto the conquests of Mahmud of Ghazni.
The Zunbil and Kabul Shahis were connected with the Indian subcontinent through common Buddhism and Zun religions. The Zunbil kings worshipped a sun god by the name of Zunfrom which they derived their name. André Wink writes that “the cult of Zun was primarily Hindu, not Buddhist or Zoroastrian”, nonetheless he still mentions them having parallels with Tibetan Buddhism and Zoroastrianism in their rituals.
“During the 8th and 9th centuries AD the eastern terroritries of modern Afghanistan were still in the hands of non-Muslim rulers. The Muslims tended to regard them as Indians (Hindus), although many of the local rulers and people were apparently of Hunnic or Turkic descent. Yet, the Muslims were right in so far as the non-Muslim population of eastern Afghanistan was, culturally linked to the Indian sub-continent. Most of them were either Hindus or Buddhists.”
I think this brief information should be sufficient for understanding that Hinduism was a major religion in Afghanistan for at least a 1000 years before the coming of Islam. It is only natural to expect this as Afghanistan south and east of Hindu Kush was always a part of the Indian subcontinent geographically, culturally, politically and genetically.