First: Ibn `Abbas narrated from `Umar that: "The Prophet (peace and blessings of Allah be upon him) divorced Hafsah, then took her back." (Reported by Abu Dawud, 2283; Ibn Majah, 2016; An-Nasa'i, 3560; and Al-Hakim in Al-Mustadrak, 2/197) who said: "This Hadith is authentic according to the conditions of Al-Bukhari and Muslim though they did not narrate it." Adh-Dhahabi agreed with him, Al-Hafidh ibn Hajar graded it as sound in Fat-h Al-Bari (9/278), and Al-Albani authenticated it in As-Silsilah As-Sahihah (5/15).
The Prophet (peace and blessings of Allah be upon him) took her back by divine command.
Anas (may Allah be pleased with him) said: "When the Prophet (peace and blessings of Allah be upon him) divorced Hafsah, he was commanded to take her back, so he took her back." (Narrated by Al-Hakim in Al-Mustadrak 2/196-197) who said: "This Hadith is authentic according to the conditions of Al-Bukhari and Muslim, though they did not narrate it." Adh-Dhahabi agreed with him, and Al-Albani authenticated it in As-Silsilah As-Sahihah (5/16).
Another narration explains the reason for the command to take her back. Al-Hakim related in Al-Mustadrak (4/15) from Qays ibn Zayd: "That the Prophet (peace and blessings of Allah be upon him) divorced Hafsah bint `Umar, and her maternal uncles Qudamah and `Uthman, the sons of Madh`un, came to her. She wept and said: "By Allah, he did not divorce me due to lack of provision." Then the Prophet (peace and blessings of Allah be upon him) came and said: "Jibril (peace be upon him) said to me: 'Take Hafsah back, for she is one who fasts much and prays much at night, and she is your wife in Paradise'". Al-Albani graded it as sound considering all its chains of narration in As-Silsilah As-Sahihah (5/17).
Second: No authentic Hadith has been narrated explaining the reason for the divorce. However, some scholars have linked this divorce to a famous incident. In this incident, the Prophet (peace and blessings of Allah be upon him) confided something to one of his wives, who then disclosed it to her companion. Allah Says (interpretation of the meaning): {And [remember] when the Prophet confided to one of his wives a statement; and when she informed [another] of it and Allah showed it to him, he made known part of it and ignored a part. And when he informed her about it, she said, "Who told you this?" He said, "I was informed by The All-Knowing, The All-Acquainted."} [At-Tahrim 66:3]
It has been established that the one to whom the Prophet (peace and blessings of Allah be upon him) confided his speech was the Mother of the Believers Hafsah (may Allah be pleased with her). Ibn Al-Jawzi (may Allah have mercy on him) said: "Regarding Allah's saying: {And [remember] when the Prophet confided to one of his wives a statement}, this refers to Hafsah, without any known disagreement." (Zad Al-Masir, 8/307).
Some exegetes have derived Hafsah's divorce from Allah's saying: {he made known part of it and ignored a part}. The word (`arrafa) appears in Al-Kisa'i's established mutawatir reading as (`arafa) without emphasis.
At-Tabari (may Allah have mercy on him) said: Regarding His saying: {he made known part of it and ignored a part}, the reciters differed in their reading. All reciters of the regions except Al-Kisa'i read it as (`arrafa) with emphasis on the letter Ra. This means the Prophet (peace and blessings of Allah be upon him) made known to Hafsah part of that conversation and informed her of it. Al-Kisa'i reported from Al-Hasan Al-Basri, Abu `Abd Ar-Rahman As-Sulami, and Qatadah that they read it as (`arafa) without emphasis on the Ra. This means he recognized Hafsah's action of revealing his secret after he had asked her to keep it confidential. The Messenger of Allah (peace and blessings of Allah be upon him) became angry with her about that and recompensed her for it. This is similar to when someone says to one who has wronged him: "I will surely recognize what you did, O so-and-so," meaning: "I will surely recompense you for it." They said: The Messenger of Allah (peace and blessings of Allah be upon him) responded to her action by divorcing her. (Tafsir At-Tabari, 23/91-92)
Abu `Ali Al-Farisi said: "The explanation for the lighter pronunciation in Al-Kisa'i's reading of (`arafa ba`dahu) is that it means he responded to it. This is the only possible interpretation. Consider that the word (`arrafa) can either mean 'to know' or what we mentioned earlier. It cannot mean 'to know' in this context. This is because when Allah revealed to the Prophet (peace and blessings of Allah be upon him) what he had confided to her, he would have known all of it. It is not possible that he would know only part of it while Allah had revealed it to him - he would necessarily know all of it. Since this interpretation is not possible, we know it must carry the other meaning. This is similar to saying to someone who does good or bad: 'I acknowledge the people of good deeds, and I acknowledge the people of bad deeds.' This means that their actions are not hidden from me, nor is the appropriate response to them." (Al-Hujjah lil-Qurra' As-Sab`ah, 6/301)
Based on this interpretation, the divorce was due to Hafsah's (may Allah be pleased with her) disclosure of the Prophet's (peace and blessings of Allah be upon him) secret.
To summarize, no authentic and explicit Hadith exists that clearly states the reason why the Prophet (peace and blessings of Allah be upon him) divorced the Mother of the Believers Hafsah (may Allah be pleased with her). However, it is likely that it was connected to the secret he had confided in her, and this view is supported by Al-Kisa'i's recitation. There might be other reasons specific to the Prophet's household that contributed to all this. Shaykh Al-Albani (may Allah have mercy on him) said: "The Hadith indicates that it is permissible for a man to divorce his wife, even if she is devoted to fasting and prayer (Sawwamah Qawwamah). This naturally only occurs due to their lack of harmony and her non-compliance with him. There might be private matters that only they can know about." (Silsilat Al-Ahadith As-Sahihah, 5/18)
The Prophet's (peace and blessings of Allah be upon him) silence about his reason for divorcing Hafsah (may Allah be pleased with her) teaches us about proper conduct in such matters. When a man divorces his wife, he should not reveal her secrets or describe her in ways she dislikes, as this would constitute backbiting. Al-Ghazali (may Allah have mercy on him) mentioned in Ihya' `Ulum Ad-Din (2/52) among the matters that a husband should observe in divorce: "He should not reveal her secrets, neither during divorce nor marriage." There is a severe warning about this in the authentic Hadith related by Muslim from Abu Sa`id who said: The Messenger of Allah (peace and blessings of Allah be upon him) said: "The most serious betrayal in Allah's sight on the Day of Resurrection is that of a man who is intimate with his wife and she is intimate with him, then he reveals her secrets"".
It is narrated that one of the righteous men wanted to divorce a woman and was asked: "What makes you doubt her?" He replied: "A wise man does not expose his wife's privacy!" When he divorced her, he was asked: "Why did you divorce her?" He replied: "What concern do I have with someone else's wife?!" (End quote)
The advice to the questioner is that she should focus her attention on two things: Gaining knowledge and implementing what Allah has clarified for us in His Book and through the teachings of His Messenger and learning from the biography of the Prophet (peace and blessings of Allah be upon him) what contains beneficial examples and guidance for us to follow.
As for such personal details - why he married this woman, or why he divorced another, or why he considered divorce - these matters are not our primary concern! What benefit can one expect from delving into such matters and seeking to know these private affairs?!
And Allah knows best.