There are a few occasions in the Old Testament where shaking denoted the presence of the Lord with his people (see Exodus 19:18; Isaiah 6:4). Given that background we should probably understand the shaking after their prayer to be a confirmation of the same.1 God has heard their prayer, and he will be with them.
31 And when they had prayed, the place in which they were gathered together was shaken, and they were all filled with the Holy Spirit and continued to speak the word of God with boldness.