Khol was indeed used as medicine, and it is still used in the same way in Middle Eastern countries and India. It protects the eyes from infection because original khol contains herbs which protect against bacterial infection, and strengthen the eyes. It also provides efficient protection from the sun, by way of the black absorbing most of the sun's rays.
Khol was also applied to burns to speed up the healing process.