If you have a 4.x device, the automatic backup/restore found under
Settings -> Backup & reset -> Back up my data and
Automatic restore options work fine. It uses Google's own servers to save a list of apps installed on your phone. After a factory reset once you sign in with the same Google account, it gives you an option to restore those apps. Keep in mind that if the goal of factory reset is to change the default Google account, you'll need to first add that account to the phone, and change the
Backup account to the secondary one you've just added.
On older Android versions the automatic backup/restore was not very reliable, but there are some 3rd-party apps in the Market that can help depending on what exactly your goal is. If you want to simply re-install apps, then AppBrain along with Fast Web Installer are great. AppBrain allows you to save the list of your installed apps to their online site, and after a factory reset you would only need to re-install these two apps, sign in, pick the list you created earlier, and it allows you to kick off a process that automatically installs the "missing" apps directly from Market.
If you also need to restore the settings and data associated with those apps, Titanium backup (rooting required) is a better choice. This app backs up all installed apps and their settings/data to your SD Card. After a factory reset you install Titanium from Market, and then do a restore. It can also backup/restore system apps and settings, which can help after a factory reset, but it's generally not recommended to do so, especially if you are planning to install a custom ROM.