Migrating user data from Community Builder
I've never used it and don't know whether it functions with current versions of CiviCRM, but there is (or was) a tool that seems related to what you are asking (although maybe just synchronizing going forward, not for existing contacts):
Joomla 2 CiviCRM User Synchronization


  This plugin integrates the Joomla and/or Community Builder
  registration process with CiviCRM.
  
  Newly created Joomla website users (from Joomla or Community Builder
  frontend or backend) will be matched with existing CiviCRM contact(s)
  based on their email address. If no matching CiviCRM contact is found,
  a new one will be created and synchronized with the Joomla user. The
  plugin can also be configured to attatch and assign a new CiviCRM
  activity to the contact.


If that's not a good solution, you may be able to prepare or download a CSV file from Community Builder and do an import to CiviCRM manually.