OK, I’ll bite.
How can they tell that from any other shards of ancient pottery?
In this case, it’s because the whole pile of stuff was smashed and not set on fire, as it might (probably would) be in the case of an invasion. But that’s indeed a tricky one. Michael Wood (the documentary maker) takes on that very problem in his Trojan War doc, pointing out that assigning destruction of just one destruction layer of Troy to an earthquake appears to be arbitrary.