You can automatically migrate application presets, user presets (including actions), and workspaces from Photoshop CS4 to Photoshop CS5 or 5.1. Likewise, you can move them from Photoshop CS5 to 5.1. To move them, use the File Migration script.
Important: Photoshop CS4 plug-ins are not compatible with Photoshop CS5. Don't migrate Photoshop CS4 plug-ins to Photoshop CS5. Likewise, do not point to the Photoshop CS4 plug-ins folder as an additional plug-ins folder from Photoshop CS5 preferences.