2 Chronicles 6:24
And if thy people Israel be put to the worse before the enemy, because they have sinned against thee; and shall return and confess thy name, and pray and make supplication before thee in this house; And if thy people Israel be put to the worse before the enemy, because they have sinned against thee; and shall return and confess thy name, and pray and make supplication before thee in this house;
This verse belongs to Solomon's prayer after the temple was erected, his temple-dedication prayer. The prayer was offered vocally, kneeling upon a brazen scaffold in the presence and hearing of the people of Israel. Its words were preserved in the Bible. It gives evidence in the Word of God for public prayer.
When Israel is put to the worse before the enemy because they have sinned against God, the people are to return to God, confess His name, and pray and make supplication before Him in this house, the temple. In that case Solomon asks God to hear from heaven, forgive their sin, and bring them again, restoring them to the land which He gave to them and to their fathers. The prayer was heard and answered when the Lord sent fire from heaven and consumed the burnt offering. The Lord also appeared to Solomon by night, saying that He had heard his prayer.
The temple is a place where God's people may assemble for worship and meet with Him by His Spirit. Yet God is not confined to a temple made with hands. He visits and encourages His people in their homes and wherever they are, and they may worship Him in every place.