The resurrection of the body will occur at the end of the age when Christ returns. There are two main ways the Scriptures indicate this.
First, many verses teach that our resurrected bodies will be the same bodies that we have now, except transformed into an immortal state. Since God does not create new bodies for us from scratch, but rather resurrects the body that dies, it is clear that we do not receive our resurrection bodies immediately at death. For our bodies very clearly and evidently remain here on earth and are laid to rest.
Second, many explicit verses declare that the resurrection will not occur until the end of the age when Christ returns.
In Daniel 12:13 an angel looks ahead to the resurrection as occurring at the end of the age: "But as for you, go your way to the end; then you will enter into rest and rise again for your allotted portion at the end of the age."
In John 6:40 Christ declares that the resurrection will happen on the last day: "For this is the will of My Father, that everyone who beholds the Son and believes in Him, may have eternal life; and I Myself will raise him up on the last day." (See also John 6:39, 44, 54; cf. 11:24).
Paul specifies this meaning even further, stating in 1 Corinthians 15:23 that we will be raised at the return of Christ: "Each [will be raised] in his own order: Christ the first fruits, after that those who are Christ's at His coming."
In 1 Thessalonians 4:14-17 he also looks ahead to the resurrection as something that will occur not until Christ comes back: "For if we believe that Jesus died and rose again, even so God will bring with Him those who have fallen asleep in Jesus. For this we say to you by the word of the Lord, that we who are alive and remain until the coming of the Lord, will not precede those who have fallen asleep. For the Lord Himself will descend from heaven with a shout, with the voice of the archangel, and with the trumpet of God; and the dead in Christ shall rise first. Then we who are alive and remain shall be caught up together with them in the clouds to meet the Lord in the air, and thus we shall always be with the Lord."
All Christians will be glorified together
The fact that the resurrection will happen at the return of Christ has important implications: It means that glorification will be a corporate reality and not an individual experience that happens to each believer separately at death. All Christians will be raised into glory together. While we all lived at different periods of time, we all came to faith at different times, and we all will have died at different times (except for those who lived until Christ returns), it is an amazing thing that God has planned things such that our glorification will occur at the same time. What a great encouragement it is to know that the believers of the past are waiting for us to finish the race ourselves so that we can all experience the great joy of glorification together.
John Piper, "What Happens When You Die? Part I: At Home With the Lord"
Wayne Grudem, Systematic Theology, chapter 42, "Glorification"