How can I keep settings after flashing a ROM?
Titanium Backup from the Android Market!

From the Technical FAQ:


Can it back up and restore applications across different ROMs or even different phones ?


YES, without restrictions. 



Although you also have:

Can it back up SMS, MMS and system settings ?


Please note that if you backup and restore all system settings across very different ROMs, you are on your own. Before restoring on a different ROM, it is strongly recommended to enable the "Data migration" option in the Titanium Backup settings.