It's not at every large harbour that one's able to walk around admiring the ships moored at the piers at night. If you're visiting Cape Town, and if the wind happens to be at bay, then grab your camera and take a walk in the V&A Waterfront.
Harbours aren't necessarily the safest areas, but even at night the V&A Waterfront is pretty safe. CCTV cameras are abundant and there are plenty of security guards roaming the walkways.