Barium x-rays are commonly performed to diagnose conditions such as ulcers, tumors, inflammation, blockages, or other abnormalities in the esophagus, stomach, and intestines. They are particularly useful when other imaging techniques, such as standard x-rays, cannot provide sufficient detail.