Before exploring the NT itself, it is fitting to situate the writings within their Second-Temple Jewish context. While the Hebrew Bible is largely silent on the topic of a future resurrection (and, thus, an intermediate state), during the Second-Temple period, the resurrection became, more or less, the standard Jewish teaching, and along with it came speculation on the nature of the intermediate state.
For example, 1 Enoch clearly teaches that the souls of the righteous are kept in peace and the souls of the wicked are kept in torment until the eschatological judgment (1 En. 1:8; 22:1-4; 102:4-5; 104:1-4; 108:11-15.). Likewise, in 2 Maccabees, the dead face a two-stage afterlife (an intermediate state, then the eschaton). In Wisdom of Solomon, the righteous (that is, the martyrs) are safe in God’s hands after they die, as they await their vindication at the eschaton (Wis. 3:1-10). In Ps.-Philo, like in 2 Maccabees, the dead face a two-stage post-mortem process; first, they enjoy a temporary, blissful rest, asleep in heaven with the fathers, then they are resurrected to live in the new heaven and new earth (LAB 3:10; 19:12-13; 23:13; 25:7; 28:10; 51:5). For Josephus, the righteous dead are currently in a blissful state, awaiting the resurrection (War 3.374). Thus, it is clear that the mainstream Jewish teaching was that, after death, the soul is kept in an intermediate state until the resurrection at the end of time; moreover, in light of the prevalence of this teaching, we should assume, unless proven otherwise, that the NT authors followed the general contours of this teaching.
1. N. T. Wright, The Resurrection of the Son of God (Minneapolis: Fortress, 2003), 129.