The short answer (unfortunately but unsurprisingly) is that we can't be sure. However, the currently most accepted theory would appear to be that the walls were for flood control, but there are other views and there is no clear consensus. The tower, on the other hand, has been associated with the summer solstice, among other things.
The most likely explanation would seem to be the walls were to protect the city against floods (for example, Haviland et al, 2007, in Evolution and Prehistory: The Human Challenge), whereas previously it was proposed that they had a defensive purpose (Kenyon, 1957). Steven Mithen, in After the Ice: A Global Human History, 20,000-5000 BC (2006), also lends more credence to the flood theory than the defensive one for the walls.1
This more recent interpretation is also noted by Muth et al in Ancient Fortifications: A Compendium of Theory and Practice (2016)
The first known fortifications built around a settlement appear at Jericho during the Pre-Pottery Neolithic A, around 8000 B.C.9 The nature of the walls is debated, however,and it has been convincingly argued that they were intended to protect the settlement against seasonal flooding.10 Evidence indicates that the military threshold for a protective wall was not crossed in the 8th millennium.11
The sources given above are:
- 9 O. Bar-Yosef, The Walls of Jericho. An Alternative Interpretation, Current Anthropology 27, 1986, 157–162.
- 10 K. M. Kenyon, Excavations at Jericho, The Journal of the Royal Anthropological Institute of Great Britain and Ireland 84, 1954, 103–110.
- 11 W. J. Hamblin, Warfare in the Ancient Near East to 1600 BC. Holy Warriors at the Dawn of History (London 2006). Note: The use here of Hamblin's 'military threshold' is taken somewhat out of context as he does not rule out local threats (see below).
Bar-Yosef, who cites over 30 sources, concludes that
Given all the available data, it seems that a plausible alternative interpretation for the Neolithic walls of Jericho is that they were built in stages as a defense system against floods and mudflows. The PPNA inhabitants of Jericho chose to live near a copious spring on a sloping plain which was subject to mudflows and sheetwash. Their response was to build a wall and then, when necessary, dig a ditch. The necessity for better protection on the western side would explain the varying thickness of the wall, which during Stages IV-VI was ca. 3.5 m in the west but remained only 1.4-1.6 m in the north and the south.
The varying thickness of the walls could suggest their purpose was anti-flood rather than defensive. Also, during the later PPNB period the wall was not maintained to the same potential defensive effectiveness. Changes in the likelihood of floods seems a reasonable explanation for this. Nonetheless, whether the flash floods would have been severe enough to require such thick walls (as well as ditches to drain away the water) can only be speculated on.
There are, though, dissenting views which argue that the wall was to defend against a human threat. Hamblin, while accepting that there was "a lack of serious and sustained military threat in the early Neolithic" says:
The appearance of such massive fortifications a thousand years before fortification in other regions has led some to question their purpose, claiming the walls were designed to protect the community from flash floods out of the wadis to the west. However, it seems dubious that protection from flash floods would require such a massive four-meter-high wall – indeed the ditch alone should have proved sufficient for flood control. The stronger interpretation is that the wall and tower had a military purpose.... It is likely that the Neolithic fortress of Jericho was built in response to a very specific, local, but ongoing threat.
As with the flood theory, there is much speculation here. Hamblin's inclusion of the tower doesn't make much sense given it's positioning in relation to the wall (its defensive use is limited).
Others, though, have cast doubt on both the flood and defense theories. Ronen and Adler (2001) have argued that it was a defense against evil spirits (also referenced here), but this doesn't really explain the ditch. Barkai and Liran (2008), while clearly agreeing with Bar-Yosef's critique of the defense theory, do not endorse the flood theory either (though nor do they refute it, their focus being on the tower rather than the wall).
Finally (concerning the wall), several sources state the above theories without clearly committing themselves to any one. Both Alan H. Simmons' The Neolithic Revolution in the Near East (2007) and The Archaeology of Syria (Akkermans & Schwartz, 2003) cite weaknesses in the defense theory, but without clearly endorsing the flood theory.
On the tower, Bar-Yosef notes that
The later history of Near Eastern fortifications seems to rule out its use as part of a fortress.
but he comes to no certain conclusion as to it's purpose:
The archaeological remains indicate that the tower was a special structure and perhaps held a special place within the settlement.
He goes on to say that:
The presence of the storage facilities attached to it in its early days may hint that it was publicly owned or at the service of the community. It is quite possible that it was also a place or a center for ritual activities.
So, yes, that 'old chestnut' ritual crops up again but, in the absence of any firm evidence, this is hardly surprising. Archaeologists Ran Barkai and Roy Liran, after looking at the surrounding environment and analyzing the architectural design have concluded that
the tower is in fact inherently aligned to celestial and geographical elements, and that the ancient Neolithic builders used it as a link between them, their town, and the universe.
Archaeologist K. Kris Hirst, citing Barkai and Liran, writes:
The stairs at the top of the tower open up facing to the east, and on what would have been midsummer solstice 10,000 years ago, the viewer could watch the sun set above Mt. Quruntul in the Judean mountains. The peak of Mount Quruntul rose 350 m (1150 ft) higher than Jericho, and it is conical in shape. Barkai and Liran (2008) have argued that the conical shape of the tower was built to mimic that of Quruntul.
This Jerusalem Post article (2011), citing an interview with Barkai, adds:
Barkai said architecture designed to awe and inspire, and without any obviously functional purpose, isn’t unique to the megalithic period. Even today, governments erect monuments like the Arc de Triomphe to influence public opinion and enhance their standing.
1 The page on which Mithen discusses the defensive vs. the flood theory aren't visible on Google books so here it is:
Kenyon assumed that these had been constructed to defend the town from attack, a seemingly irresistible conclusion, given Jericho’s biblical associations. It wasn’t until 1986 that Ofer Bar-Yosef asked some obvious questions: who were the enemies of Jericho? Why was the wall not rebuilt after it had become buried by house debris and refuse after no more than two hundred years? Why are there no other fortified sites of the same date in western Asia?
Bar-Yosef concluded that the walls had been for defense but not against an invading army – the enemy was flood water and mud-flows.7 Jericho was in perpetual danger as increased rainfall and vegetation clearance destabilized sediments on the Palestinian hills that could then be carried to the edge of the village by the nearby wadis. By the time the village rubbish had buried the walls, the level of human settlement had literally been raised up by the accumulation of collapsed houses and human debris. This had removed the threats of flood water and mud-flow. A wall was simply no longer required.
Acknowledgement: Mazura for the lead provided by his comment on Barkai and Liran.