A mild and efficient method for preparation of 3-sulfenyl and 3-selenyl coumarins and quinolinones mediated by artificial light or sunlight is presented. The elaborated protocol highlights the use of nonyl acridine orange as a photocatalyst to generate a sulfenyl radical from thiols that is further trapped by a heterocycle. The utility of the protocol is justified by a diverse scope of thiols, including