This paper deals with the photolytic and the photocatalytic degradation of sulfonamide antibiotic sulfamethazine (SMT) dissolved in Milli-Q water and in synthetic wastewater. Besides the direct photolysis, oxidation processes including UV/H2O2, UV/TiO2, and UV/TiO2/H2O2 using UV-A and UV-C radiation were investigated. Pseudo-first-order kinetics was observed for the degradation of SMT in all investigated processes. Additions of an electron acceptor (H2O2) and a catalyst (TiO2 film) accelerated the photolytic degradation of SMT for both the UV-A- and the UV-C-based processes. The most efficient process was UV-C/TiO2/H2O2 with complete degradation of SMT obtained in 10 min. The UV-A-based processes have been less efficient in terms of irradiation time required to totally degrade SMT than the UV-C-based processes. It was also confirmed that different wastewater components can significantly reduce the degradation rate of SMT. An almost ninefold reduction in the rate constant of SMT was observed for the specific synthetic wastewater. Although UV-A radiation experiments need more time and energy (2.7 times more electrical energy was consumed per gram of demineralized SMT) than UV-C experiments, they have a potential for practical use since natural UV-A solar radiation could be used here, which lowers the overall cost of the treatment. Five degradation products were detected during the degradation processes, and their structural formulae are presented. The structural formulae were elucidated based on mass spectra fragmentation pattern obtained using the tandem mass spectrometry (MS/MS) and NMR analysis.