Al-Qalam

The Pen (, "al-qalam") is the sixty-eighth chapter (sūrah) of the Qur'an with 52 verses (āyāt). Quran 68 describes God's justice and the judgment day. Three notable themes of this Surah are response to the opponents objections, warning and admonition to the disbelievers, and exhortation of patience to the Islamic prophet Muhammad. Chronologically, this is the first appearance of any of the "disjointed" [i.e., single] letters (muqattaat) which precede a number of the surahs of the Qur'an while in Quranic order this is the last surah to have the appearance of (muqattaat).
Asbab al-nuzul.
"Asbab al-nuzul" (occasions or circumstances of revelation) is a secondary genre of Qur'anic exegesis ("tafsir") directed at establishing the context in which specific verses of the Qur'an were revealed. Though of some use in reconstructing the Qur'an's historicity, "asbab" is by nature an exegetical rather than a historiographical genre, and as such usually associates the verses it explicates with general situations rather than specific events. Most of the "mufassirun" say that this surah was revealed at Mecca, at a stage when opposition to Muhammad had grown very strong and intense verbally. At the same time, here seems absence of any physical violence towards Muslims. According to some historians including William Muir, ayaat 9 to 16 refer to Walid ibn al-Mughirah as his personality traits fit in the character defined in these ayaat and a tradition by Ibn Abbas that "We know of no one whom God has described in the derogatory way in which He describes him, blighting him with ignominy that will never leave him (the adverbial qualifier [ba'da dhalika, 'moreover'] is semantically connected to zanim, 'ignoble')". Tafsir al-Jalalayn also highlights the correlation in 16th ayah: "Soon We shall brand him on the snout" and his nose being chopped off by a sword at the Battle of Badr. However the target personality is not restricted to a single person as the ayaat describe a personality type and not a name and the description starts with a plural form: "So do not obey the deniers".
Period of revelation.
Surahs in the Qur'an are not arranged in the chronological order of revelation because order of wahy or "chronological order of revelation" is not a part of Quran but according to Aisha: "Muhammed always recited the Quran in Chronological order even in prayer" and there are many verses on arrangement of Quran e.g. Surah Furqhan Verse 32 "...we have repeated it in perfect arrangement" . Also other imaams tell that Ali was ordered by Muhammed to arrange the Quran in Chronological Order. According to Israr Ahmed: Muhammed told his followers the placement (sahaba) in Quranic order of every Wahy revealed along with the original text of Quran, Israr Ahmed's word on this cannot be taken as the only truth or the only view on this subject. Wm Theodore de Bary, an East Asian studies expert, describes that "The final process of collection and codification of the Quran text was guided by one over-arching principle: God's words must not in any way be distorted or sullied by human intervention. For this reason, no serious attempt, apparently, was made to edit the numerous revelations, organize them into thematic units, or present them in chronological order...". "Surat Al-Qalam" is a Meccan sura and meccan suras are chronologically earlier suras that were revealed to Muhammad at Mecca before the hijrah to Medina in 622 CE. They are typically shorter, with relatively short "ayat", and mostly come near the end of the Qur'an's 114 surahs. Most of the surahs containing "muqatta'at" are Meccan. Henceforth apart from traditions, this surah qualifies to be Meccan typically. According to some classical traditions, commentaries and tafsirs the proposed order is 2nd in place right after Muhammad's first revelation. The supporting argument of this surah being the second revelation is that Arabs were unaware of angels in the time of Jahiliyyah and news of Muhammad's first revelation made them curious about the sanity of Muhammad, thus to refute this idea God revealed the first seven ayaat of Surah Qalam.
On the other hand, the latest suggested order is 18th place according to Theodor Nöldeke and John Medows Rodwell setting the order band from 2nd to 18th. Sayyid Qutb (d. 1966), who was an Egyptian author, Islamist of the Egyptian Muslim Brotherhood, in his Magnum opus "Fi Zilal al-Qur'an" (In the shades of the Qur'an) highlights a very interesting fact that The opening and the ending of the surah tackles the same point, therefore it is not possible to identify a specific time of revelation. 
George Sale estimates the revelation to be from fourth year of Islam.
The major scholars of Islam agree (Ijma) however that this is one of the earliest surahs to be revealed at Makkah. And perhaps the most balanced statement regarding time of revelation of this surah comes from Muhammad Asad (2 July 1900 – 20 February 1992) a Jewish-born Austro-Hungarian journalist, traveler, writer, linguist, thinker, political theorist, diplomat and Islamic scholar:
In the chronological order of revelation, this surah most probably occupies the third place. Some authorities – among them Suyuti – incline to the view that it was revealed immediately after the first five verses of surah 96 ("The Germ-Cell"); this, however, is contradicted by some of the best-authenticated traditions, according to which most of surah 74 came second in the order of revelation (see introductory note to that surah). In any case, "The Pen" is undoubtedly one of the oldest parts of the Qur'an.
 —Muhammad Asad – The Message of The Qur'an 1980 
Coherence with adjacent surahs.
The idea of textual relation between the verses of a chapter has been discussed under various titles such as "nazm" and "munasabah" in non-English literature and "coherence", "text relations", "intertextuality", and "unity" in English literature. Hamiduddin Farahi, an Islamic scholar of the Indian subcontinent, is known for his work on the concept of nazm, or coherence, in the Quran. Fakhruddin al-Razi (died 1209 CE), Zarkashi (died 1392) and several other classical as well as contemporary Quranic scholars have contributed to the studies.
Connection with previous surah.
Surah Al-Mulk (67) and Surah Qalam (68) form a pair with regard to their subject matter. Thus there is no principal difference between the central themes and topics of the two. The difference lies in the style, nature of arguments and the tone adopted. In Surah Mulk, the Quraysh are warned of the Day of Judgement, while in Surah Qalam they are warned of the punishment which a people necessarily face if they deny their punishment of the Day of Judgement, similar is the warning sounded in this sūrah. However, this sūrah is more stern in its tone. surah Mulk focused on believing in Allah, this surah Qalam focuses on believing in His Messenger, Muhammad.
Connection with next surah.
Surah Al-Haaqqa (69) also deeply resembles Surah Qalam (68), both having same the central theme: substantiation of the Day of Judgement. However, the nature of arguments differ. Just as the greatness and truth of the Qur'an are explained in the surah Qalam (68) and people are warned of the consequences of rejecting the Qur'an, similarly, in the next surah (69) this subject is discussed. The difference is that in surah 68, it is discussed in the opening part while in surah 69 it is in the concluding part. (Javed Ahmad Ghamidi (born 1951), a Pakistani Muslim theologian, Quran scholar, exegete, and educationist). Near the end of surah Qalam, Allah says: "then leave Me (to deal) with the one who rejects this Hadeeth/Statement.“ and in the beginning of surah Al-Haaqqa, Allah tells how He dealt with previous nations (ʿĀd and Thamud) who rejected and oppressed the Messenger of Allah who came to them. Allah mentioned two groups of people briefly in surah Qalam; i.e. in Ayah 38 He mentions the people of Paradise, and in ayah 42 He mentions people who will not be able to prostrate/sajdah to Allah. Allah talks about two groups of people who receive their books on Judgment Day, good and bad.
Theme of the surah.
There are almost seven divisions in the Qur'an according to Themes. The last of these seven sections goes from surah Al-Mulk [surah number 67] to surah Al-Nas [surah number 114]. This final part [last seventh of the Quran] focuses on sources of reflection, people, final scenes they will face on Judgment Day and hellfire and paradise in general and admonition to the Quraysh about their fate in the present and the hereafter if they deny Muhammad, specifically. The surah carries the theme "Let the good carry on their work, in spite of abuse of Companions of Evil: let all remember Allah, before Whom all men are on trial." True judgement comes from Allah, and not from the false standards of men. Muhammad is addressed as if to say: "The disbelievers call you a madman whereas the Book that you are presenting and the sublime conduct that you practise are by themselves sufficient to refute their false accusations. Soon they will see as to who was mad and who was sane."
The disbelievers are admonished that well-being in the hereafter inevitably belongs to those who are God-conscious. It is utterly against reason that in the hereafter, the obedient servants should meet the same fate as the guilty. Those who are being called upon to bow before God in the world and refuse to do so, would be unable to prostrate themselves on the Day of Resurrection, even if they wanted to do so, and thus would stand disgraced and condemned. They have no reasonable ground for opposing the Prophet Muhammad, they cannot either make the claim that they know with certainty that he is not a true messenger of God, nor that what he says is false.
In conclusion, Muhammad has been exhorted: "Bear with patience the hardships that you may have to face in the way of preaching the Faith until Allah's judgement arrives, and avoid the impatience which caused suffering and affliction to Jonah."
Subject matter of the surah.
This surah opens with the single discrete Arabic letter Nun (letter) and the oath of the Divine One swearing by the instrument of The Pen, as well as all knowledge that people are able to preserve and communicate thereby, is split into three parts according to the subject matter:
Hadith about al-Qalam.
Although scholars including ibn Taymiyyah claim that Muhammad has commented on the whole of the Qur'an, others including Ghazali cite the limited number of narratives, thus indicating that he has commented only on a portion of the Qur'an yet the first and foremost exegesis/tafsir of the Qur'an is found in hadith of Muhammad. Hadīth (حديث) is literally "speech"; recorded saying or tradition of Muhammad validated by isnad; with Sirah Rasul Allah these comprise the sunnah and reveal shariah. According to Aishah, the life of Prophet Muhammad was a practical implementation of the Qur'an. Therefore, a higher count of hadith elevates the importance of the pertinent surah from a certain perspective.
Since salah is one of the prior most practice in Islam, its connection surah al-Qalam according to hadith is as followes :
Surah al-Qalam contains an ayah "The Day the "shin will be uncovered" and they are invited to prostration but the disbelievers will not be able". This ayah is from the category of Mutashabih and cannot be explained or understood decisively except from the hadith.