Against: the benefits are insufficient to justify the cost (for casual/commuting)
(note: I'm completely ignoring the cost of the helmet itself, as that's a very minor factor compared to less-direct opportunity costs)
Benefit / Opportunity cost
The benefit of wearing a helmet is to partially mitigate against the risk of death or traumatic brain injury. The other benefits (visibility, attachment points, placation) are incidental. The costs are primarily messy hair, minor discomfort and inconvenience.
From what I can tell looking at the data, the odds per year of a crash that leads to death or traumatic brain injury that could be prevented by a helmet are roughly one in a million. I'm assuming going less than 15mph (24 km/h) riding safely, etc. (factoring out minors under 18, riding drunk, people going the wrong way with no lights, etc.)
Getting any kind of truly solid numbers is difficult. It's not possible to conduct a true scientific/empirical study, so the science that's out there is either purely based on studies of dummies or can't properly correct for self-selection bias (the strong possibility is that cyclists that ride safely are more likely to be wearing a helmet).
A summary of US DOT statistics put together by the IIHS shows 714 cyclist traffic deaths for 2008. 26% of them were drunk at the time, 36% were after 9pm and before 6am.
And while those numbers only include people that actually ride cycles (the population of cyclists is smaller than the total population), it also includes people that ride the wrong way, weaving across traffic, without stopping at lights/signs, drunk, with no lights, after dark. And it includes people going quite fast (where a helmet's more likely to help in case of a fall). I'm trying to make guesses on the odds for a typical transportation/commuter cyclist who is unlikely to get over 15mph.
So I'm figuring the odds of a commuter cyclist riding in a generally safe manner being killed cycling are actually lower (less likely) than being hit by lightning (1:500,000).
I can see two ways to do the math on this:
Method #1: straight time value
Of the 525,960 average minutes in a year, I spend roughly 1400 making my hair look "good" (a few minutes most mornings washing and styling my hair, plus time for a haircut every 5 or 6 weeks). So apparently I value having my hair not look messy to the tune about about 0.266% of my life. Let's factor in comfort a bit and round that up to 0.3% (one third of 1%, or about 3 thousandths). So the annualized benefit is roughly 1/1,000,000 of my life and the cost is 1/333 of my life, so the cost is about 3,000 times the benefit.
Method #2: monetary value
I'm fond of living and consider severe brain damage almost as bad as death, so I'm going to assign a value to my life of $10,000,000 (well above my expected remaining lifetime earnings). The odds seem to be about 1/1,000,000, so the benefit is $10 per year. I spend more than $10/year on my hair (shampoo, hair gel, haircuts, etc), clothes that make me comfortable, etc ($500 seems about right). I also place probably about a $50/month ($600/year) value on comfort. It's harder to place specific monetary values on my time (the primary cost), but again it seems like the cost of wearing a helmet is at least 1,000 times the benefit.
For: the cost is justified if the risk is increased or costs reduced
If I'm engaging in a riskier riding activity (going fast, anything "technical", long enough rides that I'll get tired, riding at night, riding in wet conditions, etc), the benefit of wearing a helmet increases and it's likely math like mine works out in favor of a helmet.
If the opportunity cost goes down (bald/shaved head, long ride so I'll be sweaty and need a shower afterwards anyways, rain so I'll need a hood anyways, cold so I need a hat anyways, riding home in the dark so nobody sees my messy hair afterwards), again the math works more in favor of a helmet.
If the risk is increased and the opportunity cost goes down (long sweaty ride, ride home in the dark, rainy ride), the math goes much more strongly in favor of a helmet.