"And when they had prayed, the place was shaken where they were assembled together." This was a testimony of God's visitation and that they had been heard, because sometimes this is a sign of wrath, and sometimes a sign of visitation. The apostles prayed not to be delivered from enduring hardships, but for the success of their preaching. But why did God shake the house? To strike fear into those who were threatening them, and to give the apostles courage, for since it was still the beginning of the preaching, a sensible sign was necessary. So "the place was shaken" and further strengthened the... apostles. "And they were all filled with the Holy Spirit," that is, they were inflamed and kindled within themselves the gift of grace.
Source: Commentary on Acts