Acts 1:8 is key to understanding and outlining Acts: “But you will receive power when the Holy Spirit has come upon you, and you will be my witnesses in Jerusalem and in all Judea and Samaria, and to the end of the earth” (Acts 1:8 ESV).
With this verse in mind, we better understand as Acts goes on—the Spirit came, about 3,000 people were saved in Jerusalem, and multitudes in the city came to Christ thereafter (cf. Acts 2; 4:31; 5:14; 6:1, 7). Through persecution, these believers “scattered throughout the regions of Judea and Samaria” and “went about preaching the word” (Acts 8:1, 4). Then, Saul (later Paul; cf. Acts 13:9), the instigator of this persecution (cf. Acts 7:58; 8:1; 9:1–3), was personally confronted, converted, and called by Christ in Acts 9. He then took the gospel to the Gentiles, all the way to Rome (Acts 9–28). He characterized his ministry as obeying Isaiah 49:6, echoing the end of Acts 1:8—to “bring salvation to the ends of the earth” (Acts 13:47 ESV).
As to when Luke wrote Acts, he ended with a record of Paul’s first Roman imprisonment, which may have been in AD 60–62. Luke does not tell us of Paul’s later travels, second Roman imprisonment (cf. 2 Timothy), or death, which may have been in AD 66. Thus, Luke certainly wrote Acts after Paul’s first imprisonment and sometime before Paul’s death, probably in the early 60s.
As to how Luke wrote Acts, while we can assume Luke wrote without error by virtue of the Spirit’s inspiration of Scripture, we can be further assured of the accuracy of Acts through Luke’s words in his gospel. Just as he carefully investigated the events recorded in Luke (cf. Luke 1:2–3), so also we can assume he did so for Acts. In fact, not only did he personally know many of the people in Acts, he was sometimes a part of the narrative himself (cf. Acts 16:8–17; 20:5–15; 21:1–18; 27:1–28:16).
As to why Luke wrote Acts, Acts 1:1–3 addressed the same Theophilus found in Luke 1:1–4. Luke summarized his gospel as “all that Jesus began to do and teach, until the day when he was taken up” (Acts 1:1–2 ESV), which he wrote to give Theophilus “certainty concerning the things you have been taught” (Luke 1:4 ESV). By connecting Acts to Luke, and by not giving another purpose statement in Acts, we can assume Luke’s intent for Theophilus (and all Christians) with Acts was just the same—to give him certainty about what was recorded in Acts, that is, the spread of the gospel from Jerusalem to the end of the earth.