Bioaerosols play a significant role in the transmission of many infectious diseases, especially in enclosed indoor environments. Ultraviolet (UV) disinfection has demonstrated a high efficacy in inactivating microorganisms suspended in the air. To develop more effective and efficient UV disinfection protocols, it is necessary to evaluate and optimize the effectiveness of UV disinfection against aerosolized bacteria and viruses across the entire UV spectrum. In this study, we evaluated the performance of UV disinfection across the UV spectrum, ranging from 222 to 365 nm, against aerosolized bacteria and viruses, including Escherichia coli, Staphylococcus epidermidis, Salmonella enterica, MS2, P22, and Phi6. Six commonly available UV sources, including gas discharge tubes and light-emitting diodes with different emission spectra, were utilized, and their performance in terms of inactivation efficacy, action spectrum, and energy efficiency was determined. Among these UV sources, the krypton chloride excilamp emitting at a peak wavelength of 222 nm was the most efficient in inactivating viral bioaerosols. A low-pressure mercury lamp emitting at 254 nm performed well on both inactivation efficacy and energy efficiency. A UV light-emitting diode emitting at 268 nm demonstrated the highest bacterial inactivation efficacy, but required approximately 10 times more energy to achieve an equivalent inactivation level compared with that of the krypton chloride excilamp and low-pressure mercury lamp. This study provides insights into UV inactivation on bioaerosols, which can guide the development of effective wavelength-targeted UV air disinfection technologies and may significantly help reduce bioaerosol transmission in public areas.