Variceal banding is performed to treat esophageal varices, which are abnormally dilated blood vessels in the esophagus. This procedure is typically indicated for patients with liver cirrhosis or portal hypertension, as these conditions can lead to increased pressure in the veins supplying the liver, resulting in the development of varices.