TD-DFT and TD-DFT/PCM approaches to molecular electronic excited states in gas phase and in solution