I too had the "An error occurred while installing Mac OS X" problem on my MacBook Pro. I tried several times and even completely erased my HD before trying to install Lion. I also loaded the Lion app onto a 8 Gb memory stick and tried installing from it but without luck. I both spoke to Apple and took it into a genius but no one was able to help. I thought about it for a few days and THIS IS WHAT WORKED FOR ME:
I backed up my internal HD onto a spare USB drive using the disk utility restore function. I then tested the backup drive by booting and restarting from it. I then shut it down, unplugged it and set it aside for disaster.
I then plugged in a second external drive (firewire) to the MBP and, using disk utility, I erased it. After erasing the external drive, I set the options for the drive to GUID in disk utility so it would boot from the Intel processor.
I then started up the Lion installer on my internal drive and told it to install Lion onto my external HD thus doing a completely clean install of Lion on the external drive. Once the install was completed, I rebooted from the external HD, and followed the prompts to register Lion. When it asked me about migrating from an old system, I chose the option for time machine or other hard drive and told it to migrate from my internal HD.
Once the migration was complete, I tested the system and then shut it down. I added back the original backup HD with snow leopard and rebooted from it in order to copy my external Lion HD onto the internal drive again using the restore function. I expect that I could have used a snow leopard install DVD since I just needed a disk utility. Once that was complete, I rebooted from the internal HD and Lion has been running well for the past 24 hours from the internal HD.
I have no idea why I could not get the install to work on my original erased internal HD but doing the install on an external drive and copying the complete system back onto the internal HD went without a hitch. BTW, so far I like Lion a lot especially the revised email program that looks more like my iPhone interface.