I have a test site on localhost that I'd like to put into production. Do I need to start from scratch or can I just use new xenforo files (from new license) and connect to db?
Copy the files and database from local to the server.
Update the XF ACP board URL and config.php settings as necessary.
You can use the files from the zip archive but there will be stuff missing such as config.php, attachments, avatars, cache, etc., so you would need to manually copy those over and rebuild the templates, etc.
It's easier just to zip up the entire localhost directory and copy it.