وَكَتَبْنَا عَلَيْهِمْ فِيهَا أَنَّ النَّفْسَ بِالنَّفْسِ وَالْعَيْنَ بِالْعَيْنِ وَالْأَنفَ بِالْأَنفِ وَالْأُذُنَ بِالْأُذُنِ وَالسِّنَّ بِالسِّنِّ وَالْجُرُوحَ قِصَاصٌ ۚ فَمَن تَصَدَّقَ بِهِ فَهُوَ كَفَّارَةٌ لَّهُ ۚ وَمَن لَّمْ يَحْكُم بِمَا أَنزَلَ اللَّهُ فَأُولَٰئِكَ هُمُ الظَّالِمُونَ
And therein We had ordained for them: 'A life for a life, and an eye for an eye, and a nose for a nose, and an ear for an ear, and a tooth for a tooth, and for all wounds, like for like. But whosoever forgoes it by way of charity, it will be for him an expiation. Those who do not judge by what Allah has revealed are indeed the wrong-doers.
There are a lot of crimes that Islam hasn't specified exactly what to do with and was left for the ruler to decide. Take kidnap, for instance, Islam hasn't specified punishment for kidnapping and is left open for the ruler to decide.
Note that crimes that haven't been given a punishment for are solely up to the ruler(or whoever is authorized to do so) and crimes that Islam specified a Had for, the ruler can add more punishment to it but can never ever ignore a punishment that God has specified
Torture was one of the crimes that haven't had a specific punishment by Islam(other than ones like blinding someone[hitting his eye] you take the same punishment but torture as a whole is very broad and wasn't specified exactly about it's Had) therefore it is up to the ruler but there is a specific verse that helps a lot in this matter and related
"إِنَّمَا جَزَاءُ الَّذِينَ يُحَارِبُونَ اللَّهَ وَرَسُولَهُ وَيَسْعَوْنَ فِي الْأَرْضِ فَسَادًا أَن يُقَتَّلُوا أَوْ يُصَلَّبُوا أَوْ تُقَطَّعَ أَيْدِيهِمْ وَأَرْجُلُهُم مِّنْ خِلَافٍ أَوْ يُنفَوْا مِنَ الْأَرْضِ ۚ ذَٰلِكَ لَهُمْ خِزْيٌ فِي الدُّنْيَا ۖ وَلَهُمْ فِي الْآخِرَةِ عَذَابٌ عَظِيمٌ"
Those who wage war against Allah and His Messenger, and go about the earth spreading mischief -indeed their recompense is that they either be done to death, or be crucified, or have their hands and feet cut off from the opposite sides or be banished from the land. Such shall be their degradation in this world; and a mighty chastisement lies in store for them in the World to Come
In this verse, God has mentioned some punishments for people who do extremely horrible things; the key here is "and go about the earth spreading mischief". Torture might be considered spreading mischief on earth, then you would pick the most suitable punishment from this verse for their crime(considered by many well-established scholars[this doesn't mean the ruler doesn't still have the choice]).
The punishments in this verse are usually used for overly horrible crimes and usually for well-known evil criminals that truly spread mischief upon everyone. In conclusion, torture's punishment is up to the ruler, it is left open for us, but for someone who does it constantly(e.i. famous criminal) then his punishment would probably be selected out of the 2nd verse mentioned.