How does the structure of photosynthetic pigments contribute to their function?