Accommodation in Somalia
Hargeisa is the safer and more functional of the two major cities served by international airports in the combined Somalia. Both Mogadishu and Hargeisa have hotels, with those in Hargeisa being much better appointed with basic amenities such as power and general service. Mogadishu has only two listed hotels, and the expectation must be that services are basic if existent at all.
Outside of these two cities there is no formal infrastructure catering to travellers other than aid organisation and diplomatic security compounds, that, assuming that your are travelling under that aegis, will offer safe and reasonably comfortable facilities.