Photocatalysis has been widely studied because it can use inexhaustible solar energy as an energy source while solving the problems of fossil fuel depletion and environmental pollution facing the 21st century. Metal-organic frameworks (MOFs) and covalent organic frameworks (COFs), with many advantages such as high physical/chemical stability, tunable bandgap, structural diversity, large specific surface area, etc., are considered important propellants for building better photocatalytic platforms and achieving breakthroughs. This review outlines the applications of MOFs and COFs for photocatalysis in CO2 reduction, H2 generation, and environmental pollution treatment, and elucidates the relevant photocatalytic mechanisms. In particular, the methods and mechanisms for improving the photocatalytic performance of MOFs and COFs are summarized and discussed from the three aspects. Finally, the current limitations, challenges, perspectives and future development opportunities of COFs/MOFs and COF-/MOF-based photocatalysts are summarized and prospected.