It is Rāvaṇa who orders his men to light up Hanumān's tail. From Vālmīki Rāmāyaṇa, Sundara Kāṇḍa, Sarga 53:
Hearing those words, which were appropriate for that place and time, spoken by that high-souled Vibhishana, his brother, Ravana spoke the following words in reply: [5-41-1]
"You have spoken well indeed that killing of an envoy is forbidden. Another punishment other than killing needs be certainly meted out to him." [5-41-2]
"It is said that a tail is possibly a beloved ornament for the monkeys. Let his tail be burn immediately. Let him go with a burnt tail." [5-41-3]
Background:
After Hanumān successfully locates Sītā in Lanka's Aśoka garden, he tries to convince her to mount on his back so he can take her back to Rāma. But Sītā rejects his offer. So to make the best use of his remaining time in Lanka, he plans to have a war rehearsal with Rāvaṇa's army to assess their strength and also meet Rāvaṇa to try and convince him to release Sītā and avoid the imminent war.
I have seen this black-eyed Seetha. There is only a little that remains to be done by me. Abandoning the three strategies for success viz. sowing dissension, negotiation and bribery, I have to implement here the fourth strategy viz. open assault. [5-41-2]
Then meeting Ravana with his troop of ministers, his army and his followers in battle as well as knowing his designs and strength, I will go back from here happily. [5-41-9]
During his assault, Hanumān kills Rāvaṇa's son Aksha, several grandsons, 80,000 Kinkara-demons and others but finally succumbs to Indrajit's Brahmastra and is captured. Ravana then has a dialogue with Hanuman in which he introduces himself and explains the strength of Rāma and urges him to avoid a full-blown war by immediately releasing Sītā. Rāvaṇa of course doesn't take his words seriously and orders him killed (he doesn't know that Hanuman had received the boon of chiranjīvi from Indra). Vibhishana, however, advises Rāvaṇa against it as killing an envoy is forbidden by scriptures. So that is when Rāvaṇa decides to burn Hanumān's tail instead.
When Sītā learns of this incident she prays to Agni-deva (fire god) to cool off Hanumān's burning tail:
"If I have done any service to my husband, if I have performed a penance and if I am a faithful wife, please be cool to Hanuma." [5-53-28]
"If the wise Rama has even a little of kindness to me and if I have still some good fortune remaining to my credit, please be cool to Hanuma." [5-53-29]
"If that virtuous Rama recognises me as one, who is endowed with a good moral conduct and who is ardently desirous of meeting him, please be cool to Hanuma." [5-53-30]
Overcome by anger, Hanumān then sets off entire Lanka on fire with his tail. Reflecting up on his hasty decision he later regrets and even contemplates suicide:
The entire Lanka has been reduced to ashes. No place is seen unburnt in this city. Therefore, Seetha also must have been surely lost. [5-55-11]
If this task has been spoiled due to my perverted intelligence, it is appropriate even for me, here and now itself, to give up my life. [5-55-12]
Due to culpability of my anger, I have indeed shown this apishness that is famous for instability in the three worlds. [5-55-15]
Before departing, Hanumān visits Aśoka garden once again to confirm Sītā is safe:
Thereafter, having offered his salutation to Seetha, who was present at the foot of Ashoka tree, Hanuma spoke: "Thank heaven! I am seeing you uninjured here!" [5-56-1]