Recent synthetic efforts aimed at reconstructing the beginning of life on our planet point at the plausibility of scenarios fueled by extraterrestrial energy sources. In the current work we show that beyond nucleobases the sugar components of the first informational polymers can be synthesized in this way. We demonstrate that a laser-induced high-energy chemistry combined with TiO2 catalysis readily produces a mixture of pentoses, among them ribose, arabinose and xylose. This chemistry might be highly relevant to the Late Heavy Bombardment period of Earth's history about 4-3.85 billion years ago. In addition, we present an in-depth theoretical analysis of the most challenging step of the reaction pathway, i.e., the TiO2-catalyzed dimerization of formaldehyde leading to glycolaldehyde.