Somalis love nature trees, greenery and open spaces, so historically many of the town lay outs and houses featured courtyards and people would plant trees and gardens. Any visitor that came to our major commercial centers would note this
Description of the city build out of Berbera in the 1800s:
Same thing was observed in Zayla, Mogadishu, Harar Luuq etc. In Benadiir i read that they would employ people from the country side with special expertise in planting trees which they called ''BaarFuul''(Palm Trees Cultivators).
With that said you can't underestimate a functional state or government, when a commercial city grew wealthy and was governed by an Emir or a Governor in the past it usually involved some level of planning. Further more during the Kacaan government they sought to continue the Somali cultural architecture of white washed dwellings- with many washed villas surrounded with garden and streets were lined with palm trees.
It's what characteristically gave Mogadishu the name ''The white pearl of the the Indian ocean'' . So how cities looked were enhanced by a central coordinator.
The whitewashed dwellings and buildings is a typical cultural feature you would see throughout Somali society, even in the countryside away from the cities you would see it with old tombs dotted throughout.
In Somali culture the colour white symbolizes purity, virtue and truth.
Bright coloured buildings you see today are not really a cultural Somali thing, and if they added anything to the houses would usually be covered with wooden balconies , window/door carvings and roofs.