defaults read ~/Library/Preferences/com.apple.finder FavoriteTagNames
If you are using Time Machine then first change directory to ~/Library/Preferences in the Finder. Copy that com.apple.finder.plist file to your Desktop. Then, if you have Time Machine on your menu extras panel, click it and select Browse Time Machine Backups.
That will open Time Machine to that same folder location in the first sentence. Go back in time to before you whacked the Finder Settings > Tags content. Use the search window: name:finder and that will reveal the com.apple.finder.plist file. Select and restore it, choosing to replace if prompted. Restart your Mac. See if the Favorite Tags have been restored in Finder Settings > Tags.
Since I have never whacked my Finder Settings > Tags contents I am uncertain if the above will restore them.