I can only speak for the hotels we have visited in Diani and the hotel we stay at Southern Palms for many years.
S.P. has huge closed wooden gates at the front manned by at least 4 security guards.
If coming back by taxi or safari van even if they know us which they do they will open the gates, look in the boot and scan underneath the car.
There is then a bar which is lifted for the vehicle to go to main entrance where more security guards are.
Each block of rooms are manned by security guards 24/7. The beach has security guards and there is an organised beach walk each day with the animation team and guards.
Although most hotels we have visited do not have the huge gates there are always security guards at the front of the hotel and a barrier.
All shopping centers have security guards in Diani.
If wanting to get out we normally take a taxi to a shopping center and stop off en route if we wish to go to another place.
The taxi driver will stay or come back for you at a time specified for you to take you back to your hotel.
At night it is not feasible to wander around in the dark so always take a taxi if going out. Although on saying that my husband runs outwith when I am getting ready for dinner and is dark.
Do go and have a lovely time!!