I recently needed to format a USB hard drive to get rid of multiple partitions. Disk Utility kept crashing without finishing up its job, leaving me with an unusable disk. Multiple attempts in Disk Utility failed. To make a long story short, I'm cheap and didn't want to shell out for more software, so I tried diskutil in Terminal:
diskutil eraseDisk HFS+ newdisk disk1
Where diskutil is the program being run, eraseDisk is the operand, HFS+ is the format of the new disk, newdisk is the name of the new disk, and disk1 is the mount point for the disk to be formatted. You can easily find the mount point in Disk Utility by Control-clicking on the offending disk and picking Information from the pop-up menu, then looking at the Disk Identifier entry.
Mac OS X Hints
http://hints.macworld.com/article.php?story=20070306150736965