Hierarchical tin-doped titania (ST) and tin- and nitrogen-codoped titania (SNT) microspheres were prepared by a hydrothermal method and nitriding treatment, in particular, SNT-enhanced visible light photocatalytic activity for the degradation of rhodamine B in aqueous solution and room-temperature ferromagnetism (RTFM). We initiated the photovoltaic study of ST and SNT microspheres to confirm the photovoltaic properties of perovskite solar cell (PSC) applications. The SNT microspheres exhibited relatively large saturation magnetization and high photocatalytic activity. To clarify the enhancement of the photoactivity, the prepared samples were characterized by 119Sn Mössbauer spectrometry under external magnetic fields. The broadened peaks of ST and SNT microspheres were decomposed into a doublet and a sextet under an external magnetic field because the samples showed weak ferromagnetism, although these samples are composed of nonmagnetic components. It is noteworthy that ST and SNT microspheres exhibits oxygen vacancies and defect-induced magnetism. The results signify the clear details of the RTFM and the photocatalytic activity of hierarchical ST and SNT microspheres.