The laws are not entirely obsolete. The talmud says they continued to be carried out through divine providence (Sanhedrin 37b)
- (Rav Yosef): After the Mikdash was destroyed, even though the Sanhedrin does not sit (in its place, to judge capital cases), the
four death penalties did not cease.
- Objection: Indeed, they ceased!
Correction: Rather, death according to the four death penalties did not cease:
i. Someone deserving of stoning (Beis Din throws him down from a height; if he survives, they drop a boulder on him, if necessary, he
is stoned) falls from a roof, or a beast tramples him;
ii. Someone deserving of burning falls into a fire, or a snake bites him (the venom burns him);
iii. Someone deserving of the sword, the kingdom kills him (e.g. by a guillotine) or robbers stab him;
iv. Someone deserving of choking drowns in a river or dies of quinsy (a throat sickness).
They may seem barbaric, but the consequences of the modern "live and let live" philosophy is gradual deterioration of the moral fabric of society. Sometimes, you have to be harsh to someone to save the society.
Note that it was extremely rare that such things ever happened because the study and observance of torah shielded people from committing such things. Today it is not even viewed as something so morally bad.
UPDATE: to clarify a bit more. God considers sins of sexual immorality to be very severe. This can be seen from many places such as (1) the plague at the end of parsha Balak, (2) Yosef's tribe would not have been in the Choshen had he sinned with Potifar's wife (Sotah 36b) and of course, the plague of the flood in the days of Noach, whose primary sin was sexual immorality as explained here. (This is your problem - you do not see what is the big deal in sexual immorality.)
It's important to also realize that as the Chovos Halevavos writes (Shaar Bitachon gate 4): "The punishment in both worlds, however, is through truth and justice, and it is a debt a man must pay." The purpose of suffering in this world or in Gehinom (hell) is as the Ramchal writes (Kalach Pitchei Chachma, petach #2):
the Divine will coordinates the matters so that in the end, all will
be meritorious (see Derech H-shem part 2 ch.2-4). This demonstrates
that the Divine will is truly and solely to bestow good, only that it
is necessary to go with each person according to his way. For the
wicked it is necessary to punish them in order to pardon them
afterwards. If the intent [in punishing the wicked] was to expel them,
they should have been completely banished - not that they be punished
in order to make them meritorious afterwards. This is a clear proof,
because behold the end of a matter reveals the intended purpose of all
the parts of that matter. And the end of the matter for every human
being, whether the righteous or the wicked [after they are rectified]
is to bestow on them good. If so, the intended purpose is to bestow
good on all. Hence, the Divine will is solely good. Therefore, nothing
will endure except His good.
Hence, the death penalty is actually a great kindness, because through it and repentance the offender will be pardoned of his sin, so that he will be able to enter Gan Eden scott free and will be spared of the much harsher purification process in Gehinom.
It only appears barbaric to us, because we do not see the big picture.
All punishments in the torah must be seen in context of God's benevolence and kindness as the Chovos Halevavos writes (ibid ch.3) "God is absolutely generous and kind" (Tov Halevanon commentary: i.e. the greatest possible extreme of generosity and kindness)