There is a lot of nuance here and we should clarify what indulgences are since so much confusion exists even among Catholics.
Aren't indulgences the thing that sparked the whole Catholic/Protestant split with the Reformation? Again, yes. But indulgences are still around and actually never went away. The sale of indulgences was one of the (correct) criticisms Luther had of the Catholic Church in the 16th century. But we need to be clear that it was the selling of indulgences that was the outrage of the time and not the mere existence of indulgences.
I believe it was Luther himself who warned that we should not let the abuse of a thing negate the use of it. Just because prescription drugs can be abused does not mean they are without a legitimate use. Indulgences are the same.
Indulgences are really tied up in (now specifically Catholic) views of both purgatory and salvation.
Let's dive into some very basic theology. Catholics believe when you commit a sin, you not only harm your relationship with God but you also gain an attachment to creatures as opposed to the Creator, the right attachment to have. Creatures include ideas, people, and objects. Indulgences are not grace. Catholics do not believe that grace can be earned or bought and they never have. Instead, grace is a free gift but a punishment is still incurred for sinning. This "punishment" is really just a way of saying "attachment."
When you sin, you become more attached to that sin. People who lie or more likely to find it easier to lie in the future. People who look at pornography once can fall into that habit pretty quickly. The temporal punishment for sin that souls in purgatory are working off before their entry into the perfect state of being in heaven is just a way of undoing all the damage to oneself that one's sin has done. Purgatory is a way of detaching from what your sin has attached you to.
Now, no one knows how long souls actually spend in purgatory. Some believe it's an instant of purification. Others use the language of "years." But indulgences are a way for the Church to say, "So-and-so has done the hard work of already starting to detach from their former sin by doing X, and the Church recognizes and grants that less time in purgatory will be required." And if you're not really on board with the purgatory train, it's fun to point out that Martin Luther believed in purgatory. So did C. S. Lewis, which is something few Protestants want to talk about (particularly in Wheaton).
The Catechism says this of indulgences:
An indulgence is a remission before God of the temporal punishment due to sins whose guilt has already been forgiven, which the faithful Christian who is duly disposed gains under certain prescribed conditions through the action of the Church...Lots of important stuff there. "Remission," not forgiveness; it applies to "sins whose guilt has already been forgiven"; and a person needs to be "duly disposed." So, sorry twitterverse, but if you're heart isn't right, merely reading tweets won't help you spiritually.
Where is it in the Bible?If you're wondering about the scriptural basis for all of this (which, let's face it, if you're Protestant that question has probably been burning in your mind this whole time) you can find a belief in purgatory in the Deuterocanonical books in Maccabees. Protestants hold these as the "Apocrypha."
More importantly for this discussion though is the power to bind and to loose on earth and in heaven given to the Church through Peter in Matthew 16:19. The Catholic Church sees in this the ability to grant indulgences, which is a very logical step if you start with the Catholic interpretation of that verse.