Before wiping your drive it is always a good idea to backup your personal data in your home directory.
Therefore I am sure you already have plans to do so. In case your virtual disk images are stored there (usually in the hidden ~/.VirtualBox
directory) your virtual disks will also be included in your backup of your HOME directory and they will be restored fully functional and untouched with your backup later.
However performing an upgrade from 32-bit Ubuntu to 64-bit Ubuntu can be done without deleting your data in your HOME. In case you keep your HOME you will just reinstall the virtual box application in your fresh Ubuntu installation to keep all your virtual machines (including snapshots) untouched.
Having said so, there may of course be cases where a backup of a virtual machine may be necessary (e.g. in case you want to build up a new home directory, you need to change your user name, or the virtual machines are not stored in HOME).
You then have the choice to export and import your machines in the Open Virtualization Format (OVF) either from the virtual box manager GUI or from the command line
VBoxManage export <nameofvm> -o <nameofmachine>.ovf
VBoxManage import <nameofvm>.ovf # use --dry-run first to check configurations
Due to limitations from the OVF format this will not save the current state or snapshots of a given machine. You may clone a virtual machine and register it in a new installation but this may be more work than performing a conventional backup of ~/.Virtualbox
and possible other locations you may have defined for storing the virtual hard disks.
I recommend reading the Virtual Box online manual to get an idea on options, procedures and limitations.