Luke collected a number of stories about Peter into a mini-collection (9:32-12:25). In the first of these stories, Peter is something like the Old Testament prophets Elijah and Elisha in that he goes to the boundaries of the nation and finds faithful people even there. In this finals story concerning Peter, he is back in Jerusalem at a time of persecution. Because the death of Herod Agrippa is well know from Josephus, we can date the events of this chapter fairly precisely to A.D. 43-44, some 14 years after Pentecost.
There are several Lukan literary features in this chapter. He introduces two key characters (John Mark and James) by simply mentioning them, knowing he will pick up both characters again in the following chapters. In addition, there are several stories of imprisonment for preaching the gospel, followed by a miraculous escape (twice for Peter, later with Paul in Philippi and Jerusalem, the shipwreck in chapter 27 may also be a miraculous escape story.) Finally, Acts 11:19-29 and 12:25 form a frame around this passage; this may be significant since Luke tells a very brief story of Saul’s involvement with the Antioch church and the growing importance of the ministry in that city.
Acts 12 is more here than an entertaining incident in the life of Peter: it anticipates a major transition in the book, from Peter to Paul.