Resource units are acquired through the mining of asteroids, processing of crystals, and collection of space dust. These are carefully categorized by the Resource Collectors to avoid false mining. The raw compunds were then converted to construction materials by Phased Disassembler Arrays.
It is also defined that RUs are a measurement of mineral wealth. The Bentusi Exchange, in both Homeworld and the backstory for Homeworld: Cataclysm, exchanged technology and other services for mined resources. Though they are not used as money, they are used directly as construction and tech materials.
Behind the ScenesEdit
Originally a gameplay element serving the same purpose as gold or food might in another real-time strategy game (that is, the unit of resources needed to construct your force) it has since come to be a semi-canonical element of the franchise.
In the cases where RUs aren't the main form of curency they are nonetheless used in some cases as though they were a currency. This is actually supported by canonical sources. For instance, the Bentusi Exchange, in both Homeworld and the backstory for Homeworld: Cataclysm, exchanged technology and other services for mined resources. In this case RUs could be considered an example of commodity money, like gold was in many eras of Earth's history.