We can tell the time of day from the Sun's position in the sky.
As the Earth rotates, the Sun moves from east to west across the sky.