25 About midnight Paul and Silas were praying and singing hymns to God, and the prisoners were listening to them. 26 Suddenly there was an earthquake, so violent that the foundations of the prison were shaken; and immediately all the doors were opened and everyone’s chains were unfastened. 27 When the jailer woke up and saw the prison doors wide open, he drew his sword and was about to kill himself, since he supposed that the prisoners had escaped. 28 But Paul shouted in a loud voice, “Do not harm yourself, for we are all here.” 29 The jailer  called for lights, and rushing in, he fell down trembling before Paul and Silas. 30 Then he brought them outside and said, “Sirs, what must I do to be saved?” 31 They answered, “Believe on the Lord Jesus, and you will be saved, you and your household.” 32 They spoke the word of the Lord  to him and to all who were in his house. 33 At the same hour of the night he took them and washed their wounds; then he and his entire family were baptized without delay. 34 He brought them up into the house and set food before them; and he and his entire household rejoiced that he had become a believer in God.
Narrating in the first person, Luke relates a story about irritation, persecution, imprisonment, prayer, and evangelization.
In irritated frustration, Paul’s exorcises a demon from a slave-woman fortune teller. Her owners, consequently, are angered that she no longer can make them any money, so they take Paul and Silas to the Roman authorities. Paul and Silas are whipped and put in jail. During midnight prayer, an earthquake happens, the doors of the jail are miraculously opened, and the chains of the prisoners are unfastened. A jailer who was about to be lost both corporeally (he was about to commit suicide out of duty) and eternally is saved by the grace of God operating through His servants, Paul and Silas. Paul and Silas evangelize and conversion happens, not only saving the jailer but his family as well through faith in Jesus and Baptism.
The jailer asks what he needs to do to be saved, and Paul is quite clear, “Believe in the Lord Jesus and you will be saved…” (Acts 16:31). Our justification is not about works; it is about faith in Christ. And it is only through the grace made available in this new faith that the jailer is able to charitably wash the wounds of Paul and Silas (Acts 16:33) and, "without delay," receive Baptism.
Good things come out of bad situations when suffering for Christ (Romans 8:28). Paul is flogged and imprisoned in the name of Christ. He suffers bravely, prays, and is able, through God’s grace, to convert and save a jailer and his family. In the midst of tumult, there is rejoicing.