The train crawling out of Kalk Bay station in the background departs from Cape Town station, passes though Cape Town's southern suburbs, and then takes a sharp right turn at the cost to wind it's way along the beaches of False Bay towards Simon's Town. Even though the train's interior isn't in a great condition, and it's not a "first-class" ride, the views and experience certainly are first-class. And yes, it's pretty safe - as long as you keep to daylight hours.
Tourists and locals alike can buy cheap day-traveler hop-on-hop-off tickets at Cape Town station. Besides for sticking to daylight hours, the only advice I'd give is to head out early and to try and pick a sunny, windless day.
Doesn't that sound like fun?