1 Kings 9:1-17; 2 Chronicles 7:1-17
In Leviticus 26 which goes through the stages of discipline and in Deuteronomy 29 & 30 which relate to the land covenant itself the issue is: what must Israel do to enjoy blessing in the land? The theme of the whole prayer in 1 Kings 8 is that Solomon has seven distinct petitions in his prayer and in these he is weaving together the ideas and the themes of discipline out of Leviticus and Deuteronomy. And he is reminding God of what He has promised that in terms of discipline when the people are defeated, when the people are going through famine and pestilence and their crops are being eaten by the locusts, when the blight comes upon the crops, that when the people turn back to Him and confess His name and obey Him, then forgive them. That was the repeated petition in the prayer, the calling from God to bring them back and forgive them so that they can glorify God in this place, the temple.
The first thing we need to remember is the occasion. He has completed the building of the temple which fulfils the promise that God made to David. So he is saying that in the same way God fulfilled that promise literally he was calling upon God to fulfil the promises He made at the end of the Mosaic Law and bring the people back to the land when they turn back to Him after He has disciplined them. All of that was laid out within the structure of the Law itself.
1 Kings 9 and 2 Chronicles 7 are going to explain what is going on in God's answer. Neither passage gives us everything that God said to Solomon so we have to do a little comparison in context. 1 Kings 9:2 NASB "that the LORD appeared to Solomon a second time, as He had appeared to him at Gibeon." 2 Chronicles 7:12 NASB "Then the LORD appeared to Solomon at night and said to him, "I have heard your prayer and have chosen this place for Myself as a house of sacrifice." We are not told in the Kings passage that this is a night time appearance. In the Chronicles account there is an expansion and insertion of several verses: most of the past half of verse 12, verses 13, 14 and 15. These are not in the Kings account.
2 Chronicles 7:13 NASB "If I shut up the heavens so that there is no rain, or if I command the locust to devour the land, or if I send pestilence among My people, [14] and My people [Israel, and only Israel] who are called by My name humble themselves and pray and seek My face and turn [shub] from their wicked ways, then I will hear from heaven, will forgive their sin and will heal their land. [15] Now My eyes will be open and My ears attentive to the prayer {offered} in this place." Chronicles was written toward the end of the exile and right after the exile to remind the Jews of who they were under the Mosaic Law and all that God had done for them in the past. It focuses primarily on Judah and the emphasis is on restoring the temple and the temple worship and the priesthood as it was before the exile. It is reiterating all that God had done in terms of taking them out of the land under discipline and fulfilling the request of Solomon to bring them back to the land, and the prayer of Daniel in Daniel chapter nine to bring them back to the land. So God answers Solomon, telling him that He will fulfil the prayer request.
When God uses the phrase "My people" thirteen times in 1 & 2 Chronicles in every instance it refers to Israel. It is used 30 times from Joshua to Esther, the books that cover the historical period in Israel, and when God is speaking it always refers to Israel. It is never a term for believers, it is a term for ethnic Israel that are the descendants of Abraham, Isaac and Jacob that are in covenant relationship to God under the Mosaic covenant. Also we see that the phrase "your people," when used in the historical books, always refers to Israel when God is the one who is speaking, and it is further defined in many contexts as "your people Israel." E.g. 2 Samuel 7:24 NASB "For You have established for Yourself Your people Israel as Your own people forever, and You, O LORD, have become their God." Ten times in 2 Chronicles 6 the phrase "your people" is used by Solomon in his prayer and it always refers to Israel, never to anybody else.
The conclusion from this is that the context of the Old Testament, the context of 1 Kings, the context of 2 Chronicles indicates that the phrases "your people" and "my people" always refer literally and directly to Israel. They are always used within covenant context back to the Mosaic Law and they are usually used in contexts that can't ever be extrapolated in a universal principle to any other nation, other than recognising that God is true to His Word and is going to bless those who obey Him and is going to bring judgment upon those who are disobedient.
The broad context here is that God is answering Solomon's prayer. God is going to make specific promises again to Solomon here but vv. 13-15 give a specific answer to the prayers of Solomon given at the dedication of the temple.