Photoredox catalysis for environmental and chemical applications. A mechanistically-based approach