Sunset at Stonehenge, 9 days before winter solstice.
On December 21st the South Pole is tilted towards the Sun, so it is winter in the north and summer in the south. This is caused by the Earth having a list of about 23.5 degrees from the vertical. The Earth is actually farther from the Sun in July than in January, but this makes less difference in temperatures than the direction of tilt.
It was first suggested in the 17th century that Stonehenge was aligned to the midsummer sunrise on June 21st. However during the midwinter sunset this is flipped around 180 degrees. At about 4 o'clock in the afternoon on December 21st, a hopeful crowd gathers, expecting to watch the Sunset though the central arch (like it is in this picture) as seen from the Heel Stone in the entrance avenue. In fact the Heel Stone is not in alignment to the midsummer sunrise or widwinter sunset, and will not be for another 3,000 years. It was even less so from 3,000 to 5,000 years ago, when Stonehenge was in use for whatever it was used for. At the time this picture was taken the heel stone was illuminated by the sun shining through the arch to the left. But this could have been due to the difference in azimuth between the setting sun positions on the 12th December from the 21st December.
However the picture taken on the link below at midwinter solstice shows that the azimuth is not a lot different from that of the 12th December.
Ritual buildings like Lincoln Cathedral are built so the worshippers face a particular direction when they come in. In Stonehenge they would have been facing the South-West - the direction of the midwinter sunset. And our major traditional festival of the year is in midwinter!
Ideas that it was an observatory or astronomical computer are based on the fact that people have used the position of the sun as a clock and calendar at least since Neanderthal times more than 70,000 years ago.
When all the buildings in the same place faced the same way as was usual in the past, it was often the custom to use a doorway or window frame as a sundial or calendar to tell the time of the day or certain times of the year by the position of the sun's rays or a shadow. Another method of telling the time was by the sun's position on the horizon and its alignment with particular features from a fixed point of view, which may (like a cairn of stones) have been constructed for that purpose.
Many suggestions of astronomical alignments at Stonehenge have been discounted by archaeological evidence which has revealed the claimed astronomical alignments have been to such unconnected features as a 1st World War rubbish dump, a Civil War gun emplacement and three pine trees which existed some 4,000 years before any construction work began on Stonehenge.
There is no conclusive evidence to support claims that Stonehenge was an observatory.