Photoionization and photodissociation rates in solar and blackbody radiation fields