The photochemistry of atmospheres: Earth, the other planets, and comets