I definitely like insulated cable staples for running Romex inside walls and ceilings.
For train layouts, I prefer Cable Clamps like these. Attached with screws, it's easier to remove or add wires as circumstances may change in the future. Often I will only run the screw through the back hole as I'm still running wire to make placement (and removal) easier.
For a layout already having scenery and buildings, not jarring everything by hammering in staples is also a plus.