books were opened: See Psalm 56:8; Daniel 7:10.
The Book of Life contains the names of faithful people who have experienced God's saving power (Malachi 3:16; see Revelation 3:5; 13:8; 17:8; 20:15). They are likely the same ones who experience the first resurrection (Revelation 20:5–6).
the dead were judged: The works of both the redeemed and the unredeemed will be judged (see Revelation 22:12; Matthew 16:27; 25:31–46).