People use “go down in flames” when they want to describe a complete and total failure. It’s often used when someone spectacularly fails in a way that’s memorable. The flames are a symbol of the spectacle.