The other prisoners listened because they knew that whatever was making Paul and Silas sing in their terrible condition had to be real. When you are in pain, the midnight hour may not feel like the best time for a worship service. Any fool can sing in the day . . . . Non-believers will sense the presence of God and see that the relationship the worshippers have with God is genuine. This, in turn, helps to prepare their heart for the message to follow from the Word of God.
Worship is a part of our prayer.
We see this dynamic of worship in spiritual battle when David sang for King Saul. Whenever an evil spirit tormented King Saul, he called for David, who played his harp and worshipped the Lord. David's anointed music caused the spirit to leave Saul for a time. As David worshipped God, his songs of praise and adoration had an impact on the forces of darkness. The giving of our money is an act of true worship.