The current investigation deals with the simple and ecological synthesis of CaO, MgO, CaTiO3, and MgTiO3 for the photocatalytic dilapidation of rhodamine B dye. CaO was procured from chicken eggshell waste by calcination process, while MgO was produced by solution combustion method using urea as a fuel source. Furthermore, CaTiO3 and MgTiO3 were synthesized through an easy and simple solid-state method by mixing thoroughly the synthesized CaO or MgO with TiO2 before calcination at 900 °C. XRD and EDX investigations confirmed the phase formation of the materials. Moreover, FTIR spectra revealed the existence of Ca–Ti–O, Mg–Ti–O, and Ti–O which resembles the chemical composition of the proposed materials. SEM micrographs revealed that the surface of CaTiO3 is rougher with relatively dispersed particles compared to MgTiO3, reflecting a higher surface area of CaTiO3. Diffuse reflectance spectroscopy investigations indicated that the synthesized materials can act as photocatalysts under UV illumination. Accordingly, CaO and CaTiO3 effectively degraded rhodamine B dye within 120 min with a photodegradation activity of 63% and 72%, respectively. In contrast, the photocatalytic degradation activity of MgO and MgTiO3 was much lower, since only 21.39 and 29.44% of the dye were degraded, respectively after 120 min of irradiation. Furtheremore, the photocatalytic activity of the mixture from both Ca and Mg titanates was 64.63%. These findings might be valuable for designing potential and affordable photocatalysts for wastewater purification.