For sins, are the cause of punishment for the Believers, absolutely, however, being punished on account of them in the Hereafter with Jahannam can be repelled with around ten causes.
The first: Repentance: For the one who repents from sins is like the one who has no sin, and repentance is accepted for all sins, including kufr (disbelief), fusooq (sin), ‘isyaan (disobedience). The Most High said, “Say to those who disbelieve, if they stop, then He will forgive them for what has passed…” and as for what has been reported from the Prophet (sallallaahu `alayhi wa sallaam) (in this regard) then it is much and is well known.
The second: Making Istigfhar: For Istighfaar is seeking forgiveness (magfirah) and it is a type of supplication and request, and it is overwhelmingly tied to repentance, and is also commanded. However, a man may repent but not supplicate, and he may supplicate but not repent.
The Third: Righteous Actions: For Allaah the Most High says, “Verily the good deeds take away the evil deeds…” and the Prophet (sallallaahu `alayhi wa sallaam) said to Mu’aadh bin Jabal, advising him, “O Mu’aadh, fear Allaah wherever you may be, and follow up an evil deed with a good deed, and behave with the people with good manners.”
The Fourth: Supplicating for the Believers: For the prayer of the Muslims over the dead person, and supplicating for him is amongst the causes of forgiveness, and likewise, their supplication andd seeking of forgiveness outide of the funeral prayer.
The Fifth: Supplication of the Prophet (sallallaahu `alayhi wa sallaam) during his life and after it, and his seeking forgiveness (for others), such as his intercession on the Day of Judgement.
The sixth: What is done after death of righteous actions, and which are offered for him, such as the one who gives charity on his behalf, or fasts (voluntary fasts) and performs hajj on his behalf, for it is established in the authentic hadeeths that will reach the dead and benefit him. And all of this other than supplication of his son for him, since all of that is from his own actions. The Prophet (sallallaahu `alayhi wa sallaam) said. “When the son of Aadam dies his actions are cut off except for three, recurring charity, knowledge by which others benefit from, and a righteous son who supplicates for him”, (reported by Muslim). Hence, his son is from his own earning, and his supplication (i.e. that of the son) is considered to be from his own action (i.e. the father’s), as opposed to the supplication of other than the son, since that is not considered to be from his (the father’s) action, and Allaah brings about benefit from it.
The seventh: Worldly afflictions on account of which sins are expiated for, such as what occurs in the Saheeh from the Prophet (sallallaahu `alayhi wa sallaam), “No Believer is afflicted with discomfort, or hardship, or grief, or concern, or sadness, or harm, until even a thorn that he is pricked by, except that Allaah expiates for sins on account of it.”
The eight: Whatever the Believer is put to trial with in his grave, of the compression (of the grave) and the fitnah (test, tribulation) of the two Angels.
The ninth: Whatever hardships befall him in the Hereafter of the terrors of the Day of Judgement.
The tenth: What is established in the two Saheeh’s that the Believers, when they travel over the Bridge (over Hellfire), they will all stop in a vault in between Paradise and Hellfire, where they will seek retribution from each other (of the wrongs done to each other), so when they have become purified, permission will be granted to them to enter Paradise.
And he said in another place, “And we have said more than once, that a righteous man from whom Paradise is testified for he can have sins which he has repented from, or which are wiped out by his good deeds, or which are expiated for by way of calamities, or other than that. For when a Believer sins, there are ten causes that repel the punishment of the Fire from him:
Three of them are from him, three of them are from other people, and four that Allaah discloses.  Repentance,  Seeking forgiveness and  righteous deeds that cancel out (the bad deeds).  the the Believers supplicating for him,  and presenting righteous actions for him (i.e. what is done by the son),  and the intercession of our Prophet (for him).  And calamities that expiate (sins) for him in the life of the world,  and in the Barzarkh,  and on the plains on the Day of Judgement,  and then Allaah’s forgiveness of him, due to His mercy and favour.”