with difficulty, sometimes there are diagnostic architectural features and there may be diagnostic cultural artefacts associated with foundation levels if you can excavate these. However, there needs to be a good number since some cultures indulge in archaizing wrt things like temples or religious statuary, e.g. Egyptian material that is Middle Kingdom or late 3rd Intermediate Period/Saitic depending on whom you ask. The other possibility is stratigraphy, but again that depends on excavation and hope that you luck out and get a full sequence.