I'm sorry your beardie is not feeling well.
Yes, as Jiffy mentioned, along with impaction, this is another serious risk associated with using calci-sand, or any other loose substrate. Particles can get into the eyes and cause irritation and infection. Given your dragon's current health issue, I would HIGHLY recommend removing the sand from the tank immediately and replacing it for now, with some clean paper towel (Jiffy mentioned some great ideas for future, more permanent substrate). You can try getting some sterile eye wash from the pharmacy and gently rinsing your dragon's eye a few times a day to keep it clean, and allow it heal. This may also give your dragon some temporarily relief from any pain or itchiness.
Before now, was the eye ok? Have you noticed any closing of this particular eye more than the other? Any puss or mucus forming in the eye at all before now? How is the other eye looking?
And a few further questions about your husbandry that can help us better assess the situation:
What are you using for UVB? Type (coil, compact, tube, MVB) and brand (ReptiGlo, ReptiSun, ESU, Zilla, etc)? How close is your beardie to the UVB?
Is your UVB coupled with a BRIGHT WHITE basking light?
Size of tank?
Age and size of beardie?
Thanks,
Em