What should be done with USB pins if the module is not used?

The following are the recommended connections for unused USB pins when the USB device is not connected to the host and the USB module on the device is not enabled:

VBUS May be left unconnected / floating.
VUSB Even when the USB module is not enabled, connect directly to Vdd with a bypass capacitor on it (10uF max) to limit the inrush current into the device.
D+/D- Configure as output pins driven to either state (high or low), or configure as an input with an external resistor (about 10KΩ) pulling it to Vdd or Vss. If configured as an input, only the pin input leakage current will be drawn through the pins (the same current would flow if the pin was connected directly to Vdd or Vss). Both options allow the pins to be used later for either input or output without significant hardware modifications.
USBID Configure as an output pin driving to either state (high or low), or configure as an input with an external resistor (about 10KΩ) pulling it to Vdd or Vss.
© 2016 Microchip Technology, Inc.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.