There are many programs for transferring iPhone text messages to computer as a Text file and .mht like imacsoft sms transfer, Tansee iPhone Transfer SMS etc. They cost between $9-$10. If you don't want to pay a single penny, then email text conversions to yourself and print (hell lot of time-consuming). You may refer to this step-by-step guide on how to print iPhone text messages
If you have a small amount of messages, simply use the printscreen option on your iPhone to take a picture of your text message - transfer the picture to your computer and print it out from there. Other methods include third-party software (not necessarily paid if you have less than 150 messages to print) as described here:
If you just need to print out a few text messages, then you can take the screenshots and email the images to your computer for printing or simply AirPrint the screenshots. You might also consider other options like FonePaw iOS Transfer to print out your text messages.