This quote relates to Pi's overwhelming sense of unbridled happiness when he escapes being electrocuted and burnt and destroyed when he is on his raft in the middle of the ocean during a storm. What makes Pi so happy is the way that he interprets closely avoiding being struck by a lightning bolt as some kind of divine miracle or outbreak of divine favour that clearly, to Pi's mind, shows him that he is still loved and being cared for by the various religious deities that are important to him. He calls it "a miracle" and an "outbreak of divinity," and is quick to give praise to "Allah, Lord of All Worlds, the compassionate, the Merciful, Ruler of Judgment Day."
We can understand Pi's intense, exhilirating sense of happiness when we think of his massive sense of overwhelming relief that, after so long of having had to work every minute of his life to survive, something that logically should have destroyed and consumed him and ended his life, for no apparent reason failed to work, and left him to live another day. This "miracle" to Pi is a sign of a god's favour towards him which gives him hope.