As with cycle computers, I just leave them attached (I've lost more cycle computers to falling out of pockets than to theft).
That said, as Greenbank says, the bike I'm leaving locked up regularly has a well-worn early model Cyo, rather than anything more posh.
Given a high end light and Amsterdam bike thieves (who presumably know what to do with a dynamo light, unlike their British counterparts), I'd give serious thoughts to quick-release tactics (wingnut and a Tamiya connector or something). Although for me that defeats one of the main advantages of dynamo lighting.