There are two endings in Metro: Last Light. You can get either the Redemption ending (good) or the C'est La Vie ending (bad) and it is determined by the number of morality points you have when you complete the game.

To increase your chances of getting the good ending, you need to do as many "good" things as possible while playing the game (duh). This is stuff like not killing soldiers that surrender, saving women and children, exploring, etc. You should see a white flash across the screen when you do something "good".

Below is a list to help you out. Of course if you do something bad, you will undo all the good stuff you've been doing, so check out the list of bad stuff below too.