It's all in the description really. It prevents barbarians from entering your land, it gives double experience to units which fight in your borders (which will cause great generals to spawn faster), and it's the only wonder till much later which grants great spy points. Pretty useful on most maps.
While it does make Great Generals spawn faster, it does not give any extra xp to individual units.
What it does:
1. Stop barbs from entering your land on this
continent. If you have multiple continents, it only works on the continent it is built on. Despite the fact that it says it stops barbs from entering your cultural borders, it does NOT stop barb galleys, whether you have 1 or many continents.
2. "+100% Great general emergence within cultural borders." Great generals are spawned based on the total experience
earned (barracks/stable etc do not count to this total, only "earned" combat xp. Apparently, society-wide military training does nothing when trying to produce great military men :eyeroll: but I digress) by any of your units, including any dead ones. There is a meter, that can be found at the bottom of the military advisor screen, that shows experience earned and experience to go until next great general (look for a yellow bar). Having the great wall means that any experience earned within your own borders will be doubled for Great General Spawning purposes, but does not actually double the experience the unit gained (also, confusingly, this time your own borders includes your sea borders and borders on any other continent)
3. +2 Great Spy Great person points per turn, the only wonder to do so until quite late in the game.