Light as a tool for the synthesis of complex molecules