The present invention provides a method for preparing a 2,3-dihydrobenzopyran-4-one derivative, and the method comprises the following steps: under nitrogen atmosphere at room temperature, dissolvinga 2-allyloxybenzaldehyde derivative represented by formula (I) and a benzoin derivative represented by formula (II) in an organic solvent, adding a photosensitizer, evenly mixing, placing under an ultraviolet lamp for light irradiation reaction, removing the solvent by rotary evaporation, and separating and purifying by silica gel column chromatography to obtain the resulting product 2,3-dihydrobenzopyran-4-one derivative. The preparation method solves the problems of cumbersome steps, low yield and poor environmental protection property of the existing synthesis method, can react under normaltemperature and normal pressure, and has the advantages of mild reaction conditions, no need of transition metal catalysis, simple operation, no pollution, safety, environmental protection, low costand the like. R1 and R2 are hydrogen, halogen or alkyl.