Obviously with a full face you can lock a chain through it. With an open face if you have a double ring closure you can put a small chain through it but like others have said - it's easily cut. I guess it depends where you're parking - if it's in a parking-lot or in a city street I always try and park right in front of one of the CCTV cameras - never park in a dark corner or hashed area even if they allow you too cos these area's generally aren't covered by the cameras.
Personally I always take mine with me no matter what, I have a helmet bag too that makes it much easier as then you're not having to always hold it while you shop or do whatever it is you're doing with both hands! I can put my gloves and goggles in there too without fear they'll fall out.
If you HAVE to leave a helmet locked to a bike you should always cover it was a crappy plastic grocery bag, I keep one under my seat and it's come in handy for many different things - at least that way it's not immediately obvious that it's a decent expensive item. You have to think like a thief - there are several risks in trying to steal a helmet off a bike - the rider could come back any minute, if you need to cut the chain then you need tools to do it and that is then considered premeditation and thus will result in much more sever punishment - possibly even auto-theft if the chain holding the helmet on was also stopping the bike from moving. In order to take these risks the thief has to have some reason to do so - the payoff has to seem worth it but if they don't know what kind of helmet it is and what condition it's in this makes yours a worse option than the one a few blocks down that is clearly on display.
Also, as soon as you get off the bike and take off your helmet, take 30 seconds to look around you. Look at everyone, who is watching you? After you leave make sure you're not being followed. This applies more to actual bike thieves more than helmet thieves but in big cities it's not uncommon for one person to follow you to the coffee shop and watch you while their friends load your bike into a van.
The van method is by far the most common nowadays because once it's in the van it's gone and most bikes aren't stolen to be resold they are stolen and stripped for parts cos it's much easier to steal a bike if you don't care about needing to ride it and it's much harder to find it when it's in 100 parts, however, keep in mind too that if you leave a helmet attached to your bike you're also opening it up as an opportunity theft too. In places where helmets are a legal requirement, no solo thief is going to hotwire your bike and ride off on it without a helmet but if there's one right there on the bike then you just made it easy for them.