This work reports the photocatalytic degradation of methylene blue (MB) dye using SnS2 and SnO2 nanoparticles obtained from a solvothermal decomposition (in oleylamine) and pyrolysis (in a furnace) processes, respectively, of the diphenyltin(IV) p-methylphenyldithiocarbamate complex. The complex, which was used as a single-source precursor and represented as [(C6H5)2Sn(L)2] (L = p-methylphenyldithiocarbamato), was synthesized and characterized using various spectroscopic techniques and elemental analysis. The structural properties and morphology of the as-synthesized nanoparticles were studied using X-ray diffraction (XRD) technique and transmission electron microscopy (TEM). UV-visible spectroscopy was used to study the optical property. The hexagonal phase of SnS2 and tetragonal SnO2 nanoparticles were identified, which exhibited varying sizes of hexagonal platelets and rod-like morphologies, respectively. The direct band gap energies of both materials, estimated from their absorption spectra, were 2.31 and 3.79 eV for SnS2 and SnO2, respectively. The photocatalytic performances of the SnS2 and SnO2 nanoparticle, studied using methylene blue (MB) as a model dye pollutant under light irradiation, showed that SnO2 nanoparticles exhibited a degradation efficiency of 48.33% after 120 min reaction, while the SnS2 nanoparticles showed an efficiency of 62.42% after the same duration of time. The higher efficiency of SnS2 compared to the SnO2 nanoparticles may be attributed to the difference in the structural properties, morphology and nature of the material’s band gap energy.