"justify" vs. "rationalize"
When you rationalize your (bad or irrational) behavior, you basically invent an explanation for it to make it look not as bad.
When you justify your behavior, you give a valid reason why you did what you did.
For example, a shopper can rationalize needlessly purchasing an expensive car by saying it's an 'investment'.
By contrast, if a government purchases an expensive vehicle for an ambassador, it's justified. After all, an ambassador represents a country and can't move around in a junker.
Simply put, it's the difference between finding a self-satisfying excuse and giving a good reason.
Justify comes into English via old French which got it from Latin. This word is a classic example of the French legal influence on English. When you justify something you make it in accordance with the law, ethics, or morals. Rationalize came into use in 1795. It comes from rational. When you rationalize something you make it in accordance with reason and logic.
As we have seen, in the world, rational and justifiable are two different things: "Hitler was able to rationalize his actions to the German people, but could not justify them to the world."
There is some overlap between the two words, as many things which are rational are part of our legal systems. Many things which are not rational are part of our legal systems. Rational and irrational are of course points of view. Many people say the belief in U.F.Os. is irrational. Currently, though you can see that legal matters are being challenged by same-sex marriage. At one time, it was rational that men marry women. Now, we do not see what people call the logic behind that, and it is becoming more difficult to justify discrimination. People who are religious find justification in their faith for their actions, and can rationalize their actions by saying that their god told them that their actions are correct.
You can see this distinction in the phrases legal justification or justifiable homicide. Notice that in order to to justify homicide, it needs to be in accordance with the logic of the law. If the logic of the law were that Monday Murders are O.K., a lawyer could say that his client, who had killed someone on Monday, was innocent because it was a justifiable homicide. We don't live in that world.
Because there is some overlap in meaning and people's understandings of the word, I would need some context in order to give any suggestions as to which word is better. I do not want you to think that justify is only used for legal matters, because people justify their actions all the time by appealing to logic (a "legal" body most can agree on) or their own set of moral codes.This overlap in meaning is what makes the world such an interesting place, and one reason why there are so many attorneys.
You may find the following quotations to be helpful:
"Those who lack the courage will always find a philosophy to justify it."—Albert Camus.
"You can no more bridle passions with logic than you can justify them in the law courts. Passions are facts and not dogmas."—Alexander Herzen
I do not have a source, however I do remember reading from older usage books that considered rationalize to be so-called improper English which should be avoided. However, this Google Ngram shows that occurrences of rationalize date back to 1835. I mention this because in looking for quotes for rationalize, I noticed that speakers from earlier generations used rational in places where a modern speaker might use rationalize. Case in point:
"I have never been able to conceive of how any rational being could promote happiness to himself from the exercise of power over others."—Thomas Jefferson.
There is no way I would rewrite Jefferson, but I will say that had the word rationalize been in common usage, he might have chosen it to express this idea. At least, I think of the word rationalizing when I see this quote. Perhaps others see it differently. I can see others using justify.
As a final thought, Justify can also be used in terms of defending your actions in front of an authority. This authority doesn't have to be a ruling body—it can be your boss, meter maid, English teacher, or your spouse.