The Sun radiates ultraviolet light (UV) in different wavelengths onto the Earth; UV-A and UV-B reaches the surface, while UV-C cannot penetrate the Earth's atmosphere. Due to this course of nature, microorganisms (virus, bacteria and spores) have not developed a natural resistance to light in this spectrum.
Science have proven that microorganisms have no defense to UV-C light, because UV-C mutates their DNA which in turn prevents multiplication. A microorganism that cannot multiply, cannot infect. Therefore, UV-C light is a powerful weapon against 'germs'.