***NOT A TEACHER***
Good morning, satya.
(1) I think that the infinitives in your two sentences are adverbial.
(a) They answer the question WHY?
(i) Why do they buy a shirt? (In order) to wear it.
(ii) Why do they use a pen? (In order) to write.
(2) If an infinitive is adjectival, it often answers the question WHAT?
(i) I have a job to do. What do I have? A job to do.
(ii) A policy to meet this emergency is needed. What is needed? A policy to meet this emergency.
(iii) I have nothing to say. What do you have? Nothing to say.
(3) I know that it is sometimes difficult to know whether a noun + infinitive is adverbial or adjectival.
(a) I need a car to drive to the mountains. Why do I need a car? (In order)to drive to the mountains./ Because I want to drive to the mountains. So I think we can call the infinitive clause adverbial.
(b) A car to drive to the mountains needs to be powerful. What needs to be powerful? A car to drive to the mountains. So I think that we can say that "to drive to the mountains" modifies "car." Thus it is adjectival.
Anytime you have a question, just post it here. This website's excellent teachers are eager to advise you. Have a nice day!
Student or Learner