It will be very easy to make a few references to the holy books which points to pecific behaviors expected of all humans by God in order to make heaven. Unfortunately, the reality is not that simple, because this is one topic with the ability to bring forth endless debates and arguments drawing from the different faiths we have. They all contradict each other at some point with every faith believing to be the actual true religion. If we are to go by this explanation, then parallels have to be drawn by showing the different ways each faith considers as a righteous way to heaven.
For Christianity, it's quiet simple as clearly stated in the Bible. You need to be Christ like. Meaning you should emulate the standard of life lived by Christ. That includes being born again, baptism, abstaining from sin and being righteous overall.
For Islam, you need to be a true Muslim first of all, and make certain you comply with the 5 pillars of Islam which are mandatory and considered as the foundation of Muslim life. The pillars includes Shahada (faith), Salah (5 times daily prayers), Zakat also known as charity (giving alms to the needy), Sawm (fasting during the holy month of Ramadan) and Hajj (pilgrimage to Mecca). Note: Terrorism is not a part of Islam but rather radical believers mislead by pure hate for certain groups of people.
They are several hundreds of other religions with their unique and distinctive beliefs on how to make their own heaven. I can't begin to mention all, but I'll state one, that of the Vikings which is rather weird and strange.
The Vikings is an ancient religion older than both Christianity and Islam. Early Vikings were called Norsemen. Today, the majority of Viking believers can be found in countries like Sweden, Norway, Iceland and many more. Ancient Vikings believed to make Valhalla (heaven), you have to be a proven warrior, a warrior who has fought and killed several people on the battleground, looted treasures, sailed on the sea and many order mind boggling acts. They believed dying on a battleground gave an even better edge in making Valhalla, hence they fought fearlessly and embraced death gloriously.