Solar radiation is the primary energy source for surface planetary life, so that pigments are fundamental components of any surface-dwelling organism. They may therefore have evolved in some form on Mars as they did on Earth. Photosynthetic microbes are major primary producers on Earth, but are concurrently vulnerable to ultraviolet (UV) damage. Using non-intrusive laser Raman spectroscopy to recognize the component parts of biomolecules, we have shown not only the abundance of microbial photosynthetic and photoprotective pigments in situ, but also their spatial distribution within their microhabitat. This essential aspect of their screening or avoidance survival strategies is lost on extraction with solvents. This precise approach is eminently suited to analysis of epilithic (surface) and endolithic (within rocks) communities in Antarctic desert habitats, which are putative analogues of early Mars. Raman spectra for key biomolecules (e.g. the UV screen parietin and the antioxidant β-carotene in epilithic lichens) enable not only the detection of organics in light-stratified habitats, but also the characterization of unknown pigments. Typical biomarkers of astrobiological relevance in our Raman spectral database include scytonemin (a UV screen), chlorophyll (primary photosynthetic pigment), phycocyanin (accessory pigment for shade adaptation) and a hopanoid extracted from 2·5 Gya microbial stromatolite from Australia. This compound dates from the same time period when a wetter Mars could have had a potentially flourishing surface microbial community of its own. Analyses with a laboratory Raman instrument have been extended to a novel miniature Raman spectrometer, operating at the same optimal excitation wavelength (1064 nm) via an In-Ga-As detector. After evaluation in Antarctica, this instrument will be space-qualified for a proposed Mars rover mission to detect biomolecules in the near-surface sediment profile of palaeolakes, using experience with Antarctic biomarkers to interpret alien spectra of fundamental components, without the need for prior knowledge of the identity of the target compounds.