And when you pray, do not keep on babbling like pagans, for they think they will be heard because of their many words. Do not be like them, for your Father knows what you need before you ask him. Matthew 6:7, 8
Let us not pray in public to get publicity but to bring glory to our Heavenly Father! Jesus said, “And when you pray, do not be like the hypocrites, for they love to pray standing in the synagogues and on the street corners to be seen by others. Truly I tell you, they have received their reward in full. But when you pray, go into your room, close the door and pray to your Father, who is unseen. Then your Father, who sees what is done in secret, will reward you.
Prayer is not a religious ritual but talking to God in faith and listening from Him! There is nothing wrong in praying in public, but the attitude or intention behind it is is the point. Both personal prayer and praying together as a family or as a body of believers is very important, church was earnestly praying together for Peter as we see in Acts 12:5. Also, Jesus prayed many times in public which includes when He raised Lazarus from dead, people around him saw Jesus praying, He looked up and said, “Father, I thank you that you have heard me. I knew that you always hear me, but I said this for the benefit of the people standing here, that they may believe that you sent me.” the intention of His prayer was for the glory of the Father and according to the will of the Father and His prayers was always heard when He lived on this earth as a man because of his reverent submission. Let us submit to God in everything and have faith in Him to receive answer for our prayers. He taught us how to pray and also set an example for us to follow.
God is our loving heavenly Father and He knows our need before we ask Him, so let us not babble like pagans but let our prayers be meaningful, let it be a dialogue where we make our requests known to God and also we listen from Him. Let us ask according to His will for the Spirit of God leads us into all truths, if we abide in His love and if His Words abides in us then surely we will ask according to His will and every time we will be heard. Jesus said, ask anything in my name and I will give you.