It depends on which religion you may follow but religion do give some kind of morality,set of do's and don'ts. In order to impose this morality,it instills in you fear of God,of hell and reward of heaven. Atleast major abrahmic religions work that way. They don't have fluid concepts of rights and wrongs and religious text should be followed to a T inorder to be good person they say.
As Hinduism is multitheistic,it has various definations of morality,like if you go gyan marga(knowledge way) like Vedanta,then there is no sin that you can really commit, because you are the mirror image of ultimate reality Atman. For knowledge tradition ultimate sin is ignorance,all else is contextual. They don't have the concept of heaven or hell or the judgement. You continue getting birthed in different yonis untill you realise the fact you are Atman and then you reach moksha. This is core philosophy of Hinduism.