They Yuuzhan Vong originated from a tropical planet called Yuuzhan'tar, in a different galaxy. The Yuuzhan Vong had formed a symbiotic relationship with their planet and were force-sensitive. Most of their technology was organic.
At some point in their history, the Yuuzhan Vong were caught in the middle of a devastating galactic war between to artificial species: the chaotic Abominor constructs and the orderly Silentium beings. Eventually, the organic species in the galaxy, the Vong included, rose up to fight the two species. Their home planet aided them by bestowing upon them the knowledge to create living weaponry. However, as the war dragged on, the Vong became more and more attached to war and conflict. Eventually, the Silentium and Abominor were driven from their galaxy. However, with much of their galaxy destroyed, the Yuuzhan Vong developed a strong hatred for technology and a deep xenophobia.
After the Silentium-Abominor War, the Yuuzhan Vong began a genocidal crusade to destroy all forms of technology in their galaxy. What species they didn't wipe out, they enslaved, and with that, the Yuuzhan Vong had conquered their galaxy.
However, the lust for battle that many Vong shared was unsatisfied, and the many Domains, or clans, of the Yuuzhan Vong split whatever alliances they had previously held and turned on one another, starting the devastating Cremlevian War, which resulted in the destruction of much of their old galaxy, including Yuuzhan'tar. With the destruction of their homeworld, the Yuuzhan Vong were deprived of their original symbiosis with the planet and were stripepd of their connection with the Force. This caused the entire species incredible pain, and the species saw this pain as the only way to regain their symbiosis, and thus pain became their religion. In place of their homeworld, the Vong developed several deities, known as the Yun'o, to worship, and these governed the Vong civilization.
Near the end of the Cremlevian War, two prominent rival warmasters emerged: Steng and Yo'gand. Faced with a heavily fortified fortress and Steng's entire army on the planet of Ygziir, Yo'gand developed a new war strategy. Instead of facing Steng's forces directly, he had his men attach a Dovin Basal to Ygziir. Yo'gand then had the Dovin Basal manipulate the gravity fields around Ygziir, pulling it's moon closer until it's orbit decayed and it struck the planet. This destroyed Ygziir and wiped out Steng's forces. Over time, Yo'gand united the rest of the Yuuzhan Vong and became the first Supreme Overlord of the Yuuzhan Vong.
With much of their home destroyed, the Vong were forced to seek out a new galaxy. For thousands of years, they traveled through the intergalactic void in massive worldships, searching for a new home. During this period, civil wars were common, though not on the scale of the Cremlevian War, and the Vong nearly destroyed themselves, each Domain trying to gain the favor of the Supreme Overlords.
Eventually, the Vong discovered another galaxy, and prepared to conquer it, first sending in probes to scout their target, before descending upon the galaxy with their massive armada, starting the Yuuzhan Vong War.