According to Vincent's Word Studies:
Temple of God
According to some, a figure of the Christian Church.
Others, the temple of Jerusalem.
Barnes' Notes on the Bible defends the first reading:
The phrase "the temple of God" is several times used with reference to the Christian church, 1 Corinthians 3:16, 1 Corinthians 3:17; 2 Corinthians 6:16; Ephesians 2:21; Revelation 3:12.
The context of the phrase is:
Now concerning the coming of our Lord Jesus Christ and our being gathered together to him, we ask you, brothers, not to be quickly shaken in mind or alarmed, either by a spirit or a spoken word, or a letter seeming to be from us, to the effect that the day of the Lord has come.—2nd Thessalonians 2:1-2 (ESV)
Paul is trying to correct a misconception1 that the "day of the Lord" had already occurred. Paul says it hasn't. Unfortunately, that doesn't help us determine he was referring to something other than the temple that was destroyed in 70 CE since letter was written in the 52-54 CE range.
Let no one deceive you in any way. For that day will not come, unless the rebellion comes first, and the man of lawlessness is revealed, the son of destruction, who opposes and exalts himself against every so-called god or object of worship, so that he takes his seat in the temple of God, proclaiming himself to be God.—2nd Thessalonians 2:3-4 (ESV)
Paul gives a list of things that will happen first:
- Rebellion comes
- The man of lawlessness (or "sin") is revealed
Neither of these things pin down which sense of "Temple of God" is meant. From a preterist perspective, the rebellion coming first conforms well with the Jewish revolt of 66-70 CE. But the second has problems as the best candidate seems to be the future emperor Titus. According to Wikipedia:
Destroying the Temple was not among Titus' goals, possibly due in large part to the massive expansions done by Herod the Great mere decades earlier. Most likely, Titus had wanted to seize it and transform it into a temple, dedicated to the Roman Emperor and to the Roman pantheon. But the fire spread quickly and was soon out of control. The Temple was destroyed on Tisha B'Av, in the beginning of August, and the flames spread into the residential sections of the city.
It would seem that the Second Temple was destroyed by the legions before an Emperor could "[take] his seat in the temple of God". However, the prophesy might have been fulfilled by one of the Jewish rebel leaders, Simon bar Giora for instance, who controlled the temple during the revolt.
Finally, we read this mysterious explanation:
Do you not remember that when I was still with you I told you these things? And you know what is restraining him now so that he may be revealed in his time.—2nd Thessalonians 2:5-6 (ESV)
We don't know what Paul taught them outside of the basic gospel message, but we do read in Acts:
But the Jews were jealous, and taking some wicked men of the rabble, they formed a mob, set the city in an uproar, and attacked the house of Jason, seeking to bring them out to the crowd. And when they could not find them, they dragged Jason and some of the brothers before the city authorities, shouting, “These men who have turned the world upside down have come here also, and Jason has received them, and they are all acting against the decrees of Caesar, saying that there is another king, Jesus.”—Acts 17:5-7 (ESV)
So the church Paul was writing to was largely Gentile and in conflict with the local Jews and the Roman authorities. It's possible, they identified Paul's words with the larger conflict between Rome and Jerusalem, which threatened to engulf the infant church. It does seem that the prime purpose of the two letters was to remain faithful in the face of persecutions:
So then, brothers, stand firm and hold to the traditions that you were taught by us, either by our spoken word or by our letter.—2nd Thessalonians 2:15 (ESV)
We can't know which temple Paul had in mind, but it seems to have been either the Second Temple that had not yet been destroyed or a metaphor for the church. In either case, Jesus is depicted as seeing through the deception and being revealed as victorious in history.
1. We don't know if they received a letter falsely claiming to be from Paul or or if Paul is warning against a potential false letter in the future. He can't be referring to 1st Thessalonians as that letter that the day is not yet: "For you yourselves are fully aware that the day of the Lord will come like a thief in the night."—1st Thessalonians 5:2 (ESV)