After the big explosion, Tommen committed suicide while Cersei was busy tormenting Septa Unella.
Tommen was devastated to see Margaery killed, and jumped out of the window of his tower — leaving Cersei completely childless.
His death might have been avoided if Cersei hadn't been busy waterboarding Septa Unella with red wine. Cersei left the septa strapped to a table in a dungeon with the Mountain, and promised her she wouldn't be dying any time soon. We don't know exactly what the Mountain is doing to Septa Unella, but maybe that's best left unexplained.