Taking prescribed opioids raises the risk of pneumonia in individuals with and without HIV, a new study finds.