When and how are pardons supposed to be used? Why does the Constitution even grant the president the power to pardon?
The Constitution provides very little guidance regarding this point, and it isn't clear that the Founders were of one mind about how it was intended to be used.
Relieving Wrongful Or Doubtful Convictions
One important point to keep in mind is that until about 1890 (a century after the U.S. Constitution came into force in 1789), there were no direct appeals of criminal convictions in the federal courts and collateral attacks on convictions via writs of habeas corpus were very limited. To this day, there is not a constitutional right to a direct appeal of a criminal conviction, although there is a statutory right to one and there are constitutional rules governing how appeals must be handled if they are allowed.
Historically a writ of habeas corpus could be defeated simply by proving that someone had been convicted of a crime by a court with jurisdiction over that crime and the person convicted, without regard to the details of the proceedings.
The pardon power provided an important safety valve to guard against wrongful convictions (and unduly harsh sentences) and was used frequently for that purpose even for a few decades after direct appeals from criminal convictions to appellate courts became available. Once direct appeals from criminal convictions became established as a means of relief from unfair convictions, however, the rate at which pardons were granted plummeted. The rate fell further as the scope of reasons for which habeas corpus review of a conviction could be granted was expanded.
This was the main use of the pardon power described by Alexander Hamilton in Federalist Paper No. 74, which was a document used by supporters of the Constitution to help secure its ratification. It says with respect to this purpose:
Humanity and good policy conspire to dictate, that the benign
prerogative of pardoning should be as little as possible fettered or
embarrassed. The criminal code of every country partakes so much of
necessary severity, that without an easy access to exceptions in favor
of unfortunate guilt, justice would wear a countenance too sanguinary
and cruel. As the sense of responsibility is always strongest, in
proportion as it is undivided, it may be inferred that a single man
would be most ready to attend to the force of those motives which
might plead for a mitigation of the rigor of the law, and least apt to
yield to considerations which were calculated to shelter a fit object
of its vengeance. The reflection that the fate of a fellow-creature
depended on his sole fiat, would naturally inspire scrupulousness and
caution; the dread of being accused of weakness or connivance, would
beget equal circumspection, though of a different kind. On the other
hand, as men generally derive confidence from their numbers, they
might often encourage each other in an act of obduracy, and might be
less sensible to the apprehension of suspicion or censure for an
injudicious or affected clemency. On these accounts, one man appears
to be a more eligible dispenser of the mercy of government, than a
body of men
A Tool To End Insurgencies
Another important historical use of the pardon power was to resolve once and for all instances of rebellions, uprisings, civil wars, and the mass protests to prevent ongoing criminal prosecutions (including convictions for treason) and detentions of figures whose cooperation was needed to secure peace from stirring up the public. This was done in the Whiskey Rebellion and in every almost ever major insurgency in the U.S. since then. Usually, pardons were only granted in these cases to people who swore loyalty to the U.S. in a public manner and renounced the insurgency.
Federalist Paper No. 74 also discusses this justification for the pardon power:
The expediency of vesting the power of pardoning in the President has,
if I mistake not, been only contested in relation to the crime of
treason. This, it has been urged, ought to have depended upon the
assent of one, or both, of the branches of the legislative body. I
shall not deny that there are strong reasons to be assigned for
requiring in this particular the concurrence of that body, or of a
part of it. As treason is a crime levelled at the immediate being of
the society, when the laws have once ascertained the guilt of the
offender, there seems a fitness in referring the expediency of an act
of mercy towards him to the judgment of the legislature. And this
ought the rather to be the case, as the supposition of the connivance
of the Chief Magistrate ought not to be entirely excluded. But there
are also strong objections to such a plan. It is not to be doubted,
that a single man of prudence and good sense is better fitted, in
delicate conjunctures, to balance the motives which may plead for and
against the remission of the punishment, than any numerous body
whatever. It deserves particular attention, that treason will often be
connected with seditions which embrace a large proportion of the
community; as lately happened in Massachusetts. In every such case, we
might expect to see the representation of the people tainted with the
same spirit which had given birth to the offense. And when parties
were pretty equally matched, the secret sympathy of the friends and
favorers of the condemned person, availing itself of the good-nature
and weakness of others, might frequently bestow impunity where the
terror of an example was necessary.
On the other hand, when the sedition had proceeded from causes which
had inflamed the resentments of the major party, they might often be
found obstinate and inexorable, when policy demanded a conduct of
forbearance and clemency. But the principal argument for reposing the
power of pardoning in this case to the Chief Magistrate is this: in
seasons of insurrection or rebellion, there are often critical
moments, when a welltimed offer of pardon to the insurgents or rebels
may restore the tranquillity of the commonwealth; and which, if
suffered to pass unimproved, it may never be possible afterwards to
recall. The dilatory process of convening the legislature, or one of
its branches, for the purpose of obtaining its sanction to the
measure, would frequently be the occasion of letting slip the golden
opportunity. The loss of a week, a day, an hour, may sometimes be
fatal. If it should be observed, that a discretionary power, with a
view to such contingencies, might be occasionally conferred upon the
President, it may be answered in the first place, that it is
questionable, whether, in a limited Constitution, that power could be
delegated by law; and in the second place, that it would generally be
impolitic beforehand to take any step which might hold out the
prospect of impunity. A proceeding of this kind, out of the usual
course, would be likely to be construed into an argument of timidity
or of weakness, and would have a tendency to embolden guilt.
Restoring Civil Rights
In modern, peacetime U.S. practice, the main use of the pardon power has been to restore the civil rights of people who admit to having committed crimes and have served their sentences and reformed, so that they can, for example, apply for a job not available to felons, or vote, or get a hunting license and use a firearm. Only a tiny share of modern pardons are granted to people who are currently serving sentences for the crimes of which they were convicted or to people who have not yet been convicted of crimes.
This was not a major concern in the very early days of the Republic because, at first, most really serious crimes were capital offenses. In cases where capital punishment was not imposed, in those days, the weak government bureaucracies of the early United States did not have the bureaucratic capacity to meaningfully enforce collateral consequences of felony convictions.
Moreover, in those days, there were fewer kinds of conduct that required permits or licenses or involved regulated occupations. For example, most formal qualifications to be a lawyer such as nearly universal law school and the bar exam, date from after the U.S. Civil War.
Other Reasons For Modern Persons
It is also a modern historical reality that a significant minority of pardons are granted as political favors to people connected to the incumbent President's political supporters. And, this has probably always been the case.
Only the most Machiavellian law professors and political scientists would argue that this is an important or legitimate use of the power (although there is that argument to be made), but most would argue that the Founders acknowledged the risk but felt that it was an acceptable risk due to the expected good character of future U.S. Presidents.
But, a small but non-zero share of modern pardons are granted to people who were convicted of crimes and are serving sentences that are morally unjust in some way and unlikely to be remedied by the courts.
It also isn't unprecedented for a modern pardon that commutes a sentence currently being served to be granted not because there was any doubt about the correctness or severity of the sentences for the crime being served, but instead, as a reward for some exceptionally praise worthy conduct of the pardon recipient after the fact (e.g. saving the lives of one or more innocent people in some particularly selfless and self-sacrificing manner).
Another small but significant share of modern pardons are issued to commute the death penalty either to life in prison or as a remedy for a probably wrongful conviction, in part, due to the official's opposition to the death penalty generally or in certain kinds of cases.
Can it be used to pardon any crime?
The pardon power can be used to pardon any federal crime that has actually been committed, whether or not someone has been charged with it or convicted of it. A pardon cannot prevent a federal government official from being impeached, however. A pardon also cannot be granted for a crime that has not yet been committed at the time it is granted.
Pardons can be granted to identifiable groups of people, in addition to specific individuals.
There is debate over whether the President can pardon himself. This singular issue is dealt with in another Q and A in this forum. In my opinion, the better reading of the law is that the President cannot pardon himself, but there are legitimate legal scholars who would disagree, and there are no precedents for this one way or the other at the Presidential level.