This topic is dealt with extensively by Rav Asher Weiss on his website. The following is a summary.
To begin with, two major authorities have already said that today there is no practical application of Chazal's dictum גדולה עבירה לשמה: The Ramchal (Kinas Hashem Tzevakos II ענין יעל) and Rav Chaim Volozhin (As pointed out by @Alex, in Keser Rosh § 132). The former wrote this to negate the behavior of those who still followed Shabtai Zvi ימ"ש and broke the Torah, using this dictum as justification.
Rav Asher Weiss understands Tosafos and the Ran to Sanhedrin 74b to be saying that a woman's passive participation in forbidden relations (קרקע עולם) isn't a blanket permit, rather it's just an excuse why she doesn't have to give up her life. Yael on the other hand, actively engaged in forbidden relations with Sisera. Therefore, you have to say that since it was to save the entire Jewish people, it was permitted.
In fact, the Maharik (Teshuvos § 167) says explicitly that forbidden relations are permissible when the reason it to save the entire Jewish people. He learns this from the behavior of Yael and Esther. He writes:
הנה דבר פשוט הוא כביעתא בכותחא כי אסתר לא עשתה שום איסור ולא היה בדבר אפילו נדנוד עבירה, אלא מצוה רבה עשתה כשהצילה כל ישראל וכו', וכן מצינו ביעל אשת חבר הקיני ששיבחה הכתוב במעשה דסיסרא וכו' ודבר זה מותר לעשות עבירה זו לשמה, אפילו היא אשת איש להציל את ישראל, וכן מצינו באסתר שהמציאה עצמה לאחשורוש בשעה שלא היה תובעה כדי שיתאוה לה, ויהיה נוח להתפתות לעשות לה כבקשתה
Behold, it's beyond obvious that Esther didn't do a single forbidden thing, not even a smidgen of transgression. Rather, she did a huge mitzvah, in that she saved the Jewish people...we find similarly with Yael, which the verse praises her [for her actions]. [We see] that it's permissible to perform this transgression with the right intent. Even a married woman can do this, to save the Jewish people. We find this with Esther, who made herself appealing to Achashverosh even when he didn't ask for her to come to him, in order to entice him. This way it would be easy for him to be seduced to listen to her request.
All we see from this though is to save the entire Jewish people, not an individual.
Rav Asher Weiss brings a huge novelty from the Beis Yaakov (Teshuvos § 39), who discusses a case of someone who threatened to kill a man unless he had forbidden relations with a married Jewish woman. A different woman in this group volunteered to have relations with this criminal if he would spare them all, and he accepted. The question was is this woman forbidden to her husband. The Beis Yaakov says that even though she volunteered, since there was an aspect of coercion, she's permitted. To avoid a contradiction between this and Esther, he innovates that Esther in the end wasn't forbidden to Mordechai. Besides disagreeing with his innovations (as does the Shevus Yaakov II § 117), Rav Asher Weiss sees from his words that the woman in this case committed no wrong, and it was only a question if she was forbidden to her husband. This is surprising, as it was a case of saving an individual.
In a similar case, the Shevus Yaakov (ibid) says even though the woman did properly, saving the life of everyone there by committing improper relations, she's forbidden to her husband. He invokes the actions of Yael and Esther and עבירה לשמה. We see another authority employing this idea, even when dealing with saving individuals. Rav Asher Weiss says the Ateres Chachamim (Even HaEzer § 29) writes similarly.
However, the Nodah BeYehudah (Yoreh Deah II § 161) writes that if a married woman volunteers to forbidden relations to save others, not only is she forbidden to her husband, but she committed the severe transgression of arayos. He says Esther was different because she was saving the entire Jewish people. Also, it was under the ruling of Mordechai and his Beis Din, and maybe it was through ruach hakodesh. Rav Asher Weiss learns from this that the only permit is through ruach hakodesh or a Beis Din with the power of the Anshei Kenesses HaGedolah, which have the power to uproot the Torah.
Rav Asher Weiss then examines the words of Chazal themselves. They didn't say גדולה עבירה לשמה as a permit to perform transgressions. Rather, it was an ex post facto (בדיעבד) praise of Yael's actions. Can we learn a permit at the onset (לכתחילה)? He sees from Yoma 69a that sometimes we can perform a transgression because of עת לעשות לשם. Shimon HaTzaddik wore the Kohen Gadol's clothing outside of the Temple Service when he greeted Alexander the Great, breaking the transgression of benefiting from them. He says the gemarra is clear the permit wasn't because of saving lives, but because of עת לעשות. Rashi (ad. loc.) even writes:
עת לעשות לה' - כשבא עת לעשות דבר לשמו של מקום - מותר להפר בו תורה"
עת לעשות לה' - When a time comes to do something for the sake of Hashem, it is permitted to annul the Torah.
Rav Asher Weiss sees this as a permit to break the Torah, but only coming from a ruling of "gedolei hachachamim". He also brings many cases where chachmei Yisroel ruled to break a light transgression in order to avoid a more severe transgression later. See there (end of § ד) for his examples. He also brings (see § ה) nine examples of poskim who employed the concept of גדולה עבירה לשמה. He ends with the opinion of the Netziv (Meishiv Davar II § 9):
דבעניני הנהגת הציבור לפעמים יש לנהוג עפ"י הכלל דגדולה עבירה לשמה אך ורק בשני תנאים: א. שלא יהיה בזה שום נגיעה והנאה פרטית, וכמו שהקשו חז"ל על יעל "והא קמתהניא מעבירה". ב. שיחשב שכר עבירה כנגד הפסדה והתועלת שתצמח מ"עבירה לשמה" תהיה גדולה מן ההפסד שבה
Regarding guiding a community, sometimes they should be guided according to the principle of גדולה עבירה לשמה. [However], only under the following conditions: 1) There shouldn't be any bias or personal benefit, like Chazal asked about Yael, that she benefited from her transgression. 2) Calculate the benefit of the transgression against its loss. The outcome which will come from this עבירה לשמה should be greater than the loss.
While there are a lot of details here, I see none of the above cases applying to Chizkiya, which is why he was reprimanded by Yeshaya for breaking the Torah.