Using a rigid ditopic ligand, 4,5-di(4'-carboxylphenyl)benzene (H2L), three coordination polymers (CPs) formulated as MnL(H2O)2 (1), CdL(H2O) (2) and Mn2L2(DMF)3 (3) have been synthesized and structurally characterized by single-crystal X-ray diffraction. These three CPs display 2D architectures but with different topologies. The experimental data and DFT calculation indicate that CP 2 is a semiconductor, and its CB/VB energy levels match with those of the perovskite CH3NH3PbI3. A FTO/TiO2/CH3NH3PbI3/CP 2 device is fabricated and the CP-based device shows much larger photoresponse under visible light illumination (650 nm > λ > 350 nm, 100 mW cm-2) than the individual CP 2. At 0 V vs. AgCl/Ag, the largest photocurrent density yielded by the CP-based perovskite device is ca. 200 times that of CP 2, which is due to the matched energy levels of all the materials in the device, leading the photogenerated electron-hole pairs to be separated effectively. Meanwhile, the coverage of the insoluble CP on the surface of the perovskite CH3NH3PbI3 can improve the stability of the perovskite against water.