They replied, “Believe in the Lord Jesus, and you will be saved, you and your household.”
Acts 16:31 (NIV)
When things come up in our lives that we can't understand, it's always best to turn to God for answers. He can open your eyes to see and your heart to understand them. As we see here, Paul and Silas were imprisoned because they were doing the Lord's work. God gave Paul the power to cast out demons and as a result, he is in prison for it.
When your faith brings you difficult situations, what do you do? Are you complaining or glorifying God? I would like to point out two things to you: first, Paul and Silas were not important in this incident, they were only God's instruments. Second, the purpose of this incident was to save the jailer and his family. The slave woman, with her spirit of prediction, was only the means to achieve this.
By telling the jailer that he and his family would be saved, Paul and Silas meant that his new life and saving faith would also serve as an example for his family members to come to Christ, not that they would be saved in him. Always keep this in mind, God will let you go through difficult trials to accomplish His will and that it is not your salvation that will save your family but how you live your life in Christ that will serve as an example to them.