Is there a difference between celebrating Mass for a living person and for a deceased one? In the Catholic church, the people can have Mass celebrated for someone. From the salvation point of view, what is the difference between celebrating a Mass: 


for dead persons whose souls are in purgatory 
and for persons that are still alive (e.g. for healing or repentance of that person)?


Based on this difference, is it possible to say which purpose is more important?
When Catholics say that a Mass is celebrated "for" something or someone, it just means that the priest offers the Mass—which for Catholics is the very highest form of prayer—for the sake of some intention. It is a kind of intercessory prayer, and Masses can be offered for any kind of intention (for example, for an end to a war or famine, for a recovery from illness, or simply for the sake of the local Church).

When they say that the Mass is offered "for someone," it just means that the priest offering the Mass at the behest of that person (or perhaps even a third party; for instance, a mother might ask a priest to offer the Mass for her son).

When that person in question is deceased, the Mass in question is usually offered for the repose of the soul of that person.

(For those who are not familiar with the doctrine, the Church teaches that it is possible for someone to die in the state of friendship with God, but not completely sanctified or purified. For those persons, a purification is needed after death: what Catholics call "Purgatory." Note that Purgatory is not an intermediate state between Heaven and Hell, but, as it were, the antechamber of Heaven, where people prepare to enter Heaven. According to Catholic doctrine, all of the souls in Purgatory will reach the Divine Presence in the end.)

Catholics believe that intercessory prayer can help those persons that need it to complete their purification after death. Since the Mass is the highest form of intercessory prayer possible, many (if not most) Masses are celebrated with for the sake of some loved one who is deceased.

Returning to the question, determining which purpose is the more important is complex, because it depends on the intention requested.

For example, the repentance of someone not in friendship with God is more important than the purification of a deceased person in Purgatory, since the salvation of the souls in Purgatory is assured, whereas the salvation of the former person is in peril. 

On the other hand, praying for someone in Purgatory is probably (at least absolutely speaking) more important than praying for someone's physical healing, because (at least according to the testimony that many saints and mystics have given) the purification in Purgatory causes a suffering much greater than that caused by illness.

One should also keep in mind that although each Mass has what is called a "first intention"—which is regulated by Canon law to avoid abuses in collecting  donations for Masses—a single Mass can have any number of "second intentions." Therefore a single Mass could be offered for both a living person and a deceased one, or several of each. Moreover, the "second intentions" are not worth "less" than the first; it is just that only first can be attached to a donation (and priests may collect a maximum of one per day).

The reason that most Masses are offered for deceased souls (as a first intention) has less to do, I think, with the intrinsic importance of the intention, as with the spiritual needs of the faithful. Many people request Masses for their deceased relatives, usually with a small donation (stipend), and therefore these, as a practical matter, become the most common first intention.