I know the official Xenforo install guide tells you to CHMOD 0777 folders data and internal data, but is it just literally those folders? What about the files? Or should we chmod -R 0777 both the folders including files?
During a fresh installation, there wouldn't be any files in those folders (except for index.html, which we don't write to), so it generally shouldn't relate to children. But if there is existing content there, you may need to do the chmod recursively.
Saying that, you can hold of chmodding when installing unless the installer tells you that it's needed. If you run PHP as the same user as your FTP user (common with cPanel), then you generally won't need to do any chmodding.
The answer is normally "it depends". If PHP is running as the web server user, then generally you would want to 0777 those directories, to ensure they can be written to by the PHP user. (There are more nuances/options as well from a more advanced perspective though frankly this should be fine.)