All helmets are ANSI CPSC and/or Snell approved, and thus sufficiently safe. The difference between a cheap helmet and an expensive one is fit, comfort (i.e., ventilation) and style.
I value the protection a helmet gives -- I'm pretty sure my old one saved me from at least a concussion, and keep it as a reminder -- but I'm perfectly satisfied with a $30 bottom-of-the-line Giro.
Incidentally, places like REI, Performance Bike and Nashbar can sometimes approach Wal-Mart prices for helmets, when they're on sale/clearance.