We have studied the effect of hydrothermal conditions at constant temperature of 180 °C, varying preparation time for 15, 30 and 45 h on nanostructures of diluted magnetic semiconductor Sn0.95Co0.05O2 (SC5). X-ray diffraction pattern confirm the tetragonal SnO2 rutile phase. The transmission and scanning electron microscopy shows the resulting nanostructures i.e. nanospheres and nanorods. The proposed reaction mechanism is given. The Raman spectra show the formation of tetragonal rutile structure of SC5 nanostructures. Fourier transform infrared spectrum has been used to verify the existence of Sn–O bond. The photoluminescence spectra show that the emission spectral intensity increases gradually with decreasing grains size, increasing hydrothermal heating time of SC5 samples and exhibits an intense blue luminescence centered at a wavelength of 531 nm. The optical absorbance measurements revealed that the nanometric size of the materials influences the energy band gap. All the prepared SC5 samples exhibit room temperature ferromagnetism.