Spectroscopy and Photochemistry of Planetary Atmospheres and Ionospheres