The one whose good deeds outweigh his bad deeds will enter Paradise and will be safe from punishment
Question

I would like to know what will happen to the Muslim after all his deeds have been weighed. Will he go to Paradise if his good deeds outweigh his bad deeds? Or will he go to Hell first, so that he may be purified from the bad deeds that he committed?
Praise be to Allah.Firstly:
One of the matters of the hereafter in which we are required to believe is the Balance or scales of justice in which people’s deeds will be weighed, as Allah, may He be glorified, says (interpretation of the meaning):
{And We place the scales of justice for the Day of Resurrection, so no soul will be treated unjustly at all. And if there is [even] the weight of a mustard seed, We will bring it forth. And sufficient are We as reckoners} [al-Anbiya’ 21:47].
At-Tahhaawi (may Allah have mercy on him) said in his famous ‘Aqeedah: And we believe in the resurrection and requital of deeds on the Day of Resurrection; the presentation of deeds and the reckoning; the reading of the record of deeds; the reward and punishment; and the siraat [a bridge over Hell which all must cross] and the Balance. End quote.
The weighing of deeds in the Balance will come after the reckoning and before the siraat.
Al-Qurtubi (may Allah have mercy on him) said: The scholars said: When the reckoning is finished, after that will come the weighing of deeds, because the weighing is for requital, so it should come after the reckoning. So the reckoning is to present the deeds so that the doer will acknowledge them, and the weighing is to show their weight, so that the requital will be commensurate with that. Allah, may He be exalted, says (interpretation of the meaning):
{And We place the scales of justice for the Day of Resurrection, so no soul will be treated unjustly at all } [al-Anbiya’ 21:47]
{Then as for one whose scales are heavy [with good deeds], 
He will be in a pleasant life, But as for one whose scales are light, His refuge will be an abyss} [al-Qaari ‘ah 101:6-9]. 
End quote from at-Tadhkirah, p. 359.
However, there is no religious text that shows these events in this order, and there is only what some scholars worked out on the basis of ijtihad. The sequence of events mentioned by al-Qurtubi, narrating from the scholars, is appropriate from a chronological point of view, because Allah will bring a person to account for his deeds, and He will make him acknowledge them, then after that the Balance will be set up to follow on from that reckoning, so that Allah will show the person the verification of that reckoning accurately in the Balance.
See: al-Hayaat al-Aakhirah by al-‘Awaaji, 3/1169.
Secondly:
When their deeds have been weighed, people will be divided into three groups:
The first group will be those whose good deeds outweigh their bad deeds. They will be blessed and successful, as Allah, may He be exalted, says (interpretation of the meaning)
{And those whose scales are heavy [with good deeds] - it is they who are the successful. 
But those whose scales are light - those are the ones who have lost their souls, [being] in Hell, abiding eternally} [al-Mu’minoon 23:102, 103]
{Then as for one whose scales are heavy [with good deeds],
He will be in a pleasant life. 
But as for one whose scales are light, 
His refuge will be an abyss.
And what can make you know what that is? 
It is a Fire, intensely hot} [al-Qaari‘ah 101:6-11].
The second group will be those whose bad deeds outweigh their good deeds. If such a person is a Muslim, he will enter Hell, then when he has been purified, he will be brought forth from it and will enter Paradise. But if he was a disbeliever, he will remain in it for ever and ever, as stated in the verse from Soorat al-Mu’minoon quoted above.
The third group will be those whose good deeds and bad deeds are equal. These are the people of the a‘raaf. They will be in a place between Paradise and Hell, able to see the people in both, as Allah, may He be exalted, says (interpretation of the meaning):
{And between them will be a partition, and on [its] elevations are men who recognize all by their mark. And they call out to the companions of Paradise, “Peace be upon you.” They have not [yet] entered it, but they long intensely 
And when their eyes are turned toward the companions of the Fire, they say, “Our Lord, do not place us with the wrongdoing people”} [al-A‘raaf 7:46-47].
The ultimate fate of the people of the a‘raaf will be admittance to Paradise after that.
Ibn Katheer (may Allah have mercy on him) said in his Tafseer (2/289): When Allah, may He be exalted, mentions the people of Paradise speaking to the people of Hell, He points out that between Paradise and Hell there is a partition, which is a barrier that prevents the people of Hell reaching Paradise. … Ibn Jareer said: The word a‘raaf is the plural of ‘urf; the Arabs call any high ground ‘urf; in fact the comb of the rooster is called ‘urf because it is elevated.
According to a report narrated from Ibn ‘Abbaas, al-A‘raaf is a hill between Paradise and Hell at which some of those who committed sin will be detained, between Paradise and Hell. According to another report from him, it is a wall between Paradise and Hell. Ad-Dahhaak and more than one of the scholars of tafseer said something similar. As-Saddi said: It is so called because those who are detained there will recognize (ya‘rifoon) people. The comments of the mufassireen as to who the people of the a‘raaf are vary, but they are all close in meaning and point to one idea, which is that they are people whose good deeds and bad deeds are equal. This was stated by Hudhayfah, Ibn ‘Abbaas, Ibn Mas‘ood and others among the earlier and later generations (may Allah have mercy on them). Ibn Jareer said: Ya‘qoob told me: Hushaym told us: Husayn informed us, from ash-Sha‘bi, from Hudhayfah, that he was asked about the people of the a‘raaf and he said: They are people whose good deeds and bad deeds are equal, so their bad deeds will detain them from Paradise and their good deeds will hold them back from Hell. So they will be detained there on the wall, until Allah passes judgement concerning them. End quote.
Shaykh al-Islam Ibn Taymiyah (may Allah have mercy on him) said: In addition to his bad deeds, a person may do good deeds that equal them and counteract them, and thus he will be saved from the Fire but he will not deserve Paradise; rather he will be one of the people of the a‘raaf. Even though they will ultimately enter Paradise, they are not among those to whom Paradise will be brought near, because they did not have sufficient fear of Allah and did not turn to Him often.
End quote from Majmoo‘ al-Fataawa (16/177).
Shaykh Ibn ‘Uthaymeen (may Allah have mercy on him) asked: I have heard of someone who says that the a‘raaf is a wall between Paradise and Hell, where they will remain for a number of years.
He replied: On the Day of Resurrection, the people will be divided into three groups:
A group whose good deeds outweigh their bad deeds; they will not be punished and will be admitted to Paradise. Another group whose bad deeds outweigh their good deeds; they will deserve punishment commensurate with their bad deeds, then they will be saved and admitted to Paradise. And the third group whose bad deeds and good deeds are equal; they are the people of the a‘raaf and are not among the people of Paradise or the people of Hell. Rather they will remain in a place with a lofty barrier, where they can see the Fire and can see Paradise. They will remain there for as long as Allah wills, and ultimately they will enter Paradise. This is by the perfect justice of Allah, may He be glorified and exalted, for He will give to each person what he deserves. So the one whose good deeds weigh more heavily will be one of the people of Paradise; the one whose bad deeds weigh more heavily will be punished in the Fire for as long as Allah wills; and the one whose good deeds and bad deeds were equal will be one of the people of the a‘raaf. But the a‘raaf is not something that will continue forever; rather what will continue forever is either Paradise or Hell. May Allah make me and you among the people of Paradise.
End quote from Liqa’ al-Baab al-Maftooh (14/16).
And Allah knows best.