What folders should I be backing up? Are there any I should avoid?
Some people recommend backing up your entire ~/Library folder. But I find there are a lot of things in there I wouldn't want replaced if doing a clean install. So I selectively back up certain contents of that folder, along with certain contents of the system level /Library folder.

You should poke around in ~/Library and see what's in there that you need. Here's a list of what I backup to get you started:

~/Library/Application Support and ~/Library/Preferences are where most of your application settings live. You should go through each of those folders' subfolders and see which ones you need.

Notably, Address Book's database is stored in an Application Support subfolder while some other Mac OS preinstalled apps have their folders directly at the ~/Library level. It's a good idea to look through the folders at that level as well. For example:

~/Library/Mail has your Mail.app data.

~/Library/Calendars has your iCal data.

~/Library/iTunes has all your iOS device backups and iTunes specific scripts.

~/Library/Scripts is probably where you install scripts if you use AppleScripts as folder actions.

~/Library/ScriptingAdditions holds any AppleScript additions you've installed.

~/Library/Keychains is the default location using Keychain Access to save passwords.

~/Library/Fonts for all fonts installed for the current user.

~/Library/ColorSync for all color profiles installed for the current user.

~/Library/Safari/Bookmarks.plist has your Safari bookmarks. The other stuff in this folder is a good example of what I'd like to NOT be restored after a clean install.

The structure of the system level /Library folder closely matches that of the ~/Library folder, so if there are things in there (fonts, color profiles, scripts etc.) installed "for all users", you should back those up too.

Hope that helps you get started!