The most common cause of cholangitis in children is a bacterial infection, often secondary to an obstruction in the bile ducts. This obstruction can be due to biliary atresia, choledochal cysts, or gallstones. Other causes include congenital anomalies and post-surgical complications.