The hydrothermal method was used to introduce different amounts of Praseodymium ion (Pr3+) (1, 3, 5, 7, 9, and 11 at.%) and Yttrium ion (Y3+) (1, 3, 5, 7, 9, and 11 at.%) into existing SnO2 nanoparticles. A novel nanocomposite was created by combining Fe3O4 and SnO2:Pr3+,Y3+ nanoparticles, resulting in a material with magnetic properties, i.e., Fe3O4/SnO2:Pr3+,Y3+, named FPYS. Subsequently, the hydrothermal synthesis approach was utilized to produce nanocomposites of FPYS in the presence of plant extract. The photodecomposition efficiency of as-synthesized nanocomposite was studied with some selected dyes and pesticides under 50W LED light. The present study focused on experimentally optimising the key parameters like the initial concentration, photocatalyst quantity, photocatalyst reuse, and pH level. By employing the Langmuir-Hinshelwood model, we successfully calculated the rate at which RhB, MB, 2,4-DCP, and MB undergo photocatalytic degradation under optimal conditions (pH = 7, pollutant concentration = 8 ppm, volume of pollutants = 20 mL, and photocatalyst amount = 3 mg). The model showed that MB, RhB, 2,4-DCP, and TCAA have k values of 0.061, 0.062, 0.051, and 0.036 min−1, respectively. The breakdown rate for MB dye was 81% and for RhB dye was 78% with nanocomposite made in the presence of 2 mL of Parkia speciosa extract, which was subjected to LED radiation for 150 min at pH 7. The degradation rates of 2,4-DCP and TCAA differed, i.e., the former was degraded by 68% and the latter by 52%. Pr3+ and Y3+ ions co-doped with SnO2 enhanced the photocatalytic degradation of dyes and pesticides.