Spoilers for Star Wars: The Last Jedi can be found throughout this article. The fact that Kylo Ren goes shirtless is obviously not a giant spoiler, but we are going to get into details about the scene, so if you want to avoid those spoilers, check out one of our other lovely articles.
By now, if you've seen Star Wars: The Last Jedi, you will know that Kylo Ren and Rey were connected in an unexpected way. Not only were they able to speak mentally with one another despite being in very different locations, they were also able to see and touch one another through that connection. This led to one scene where fans got an eyeful of Adam Driver without a shirt on, but if you thought that scene was simply there as eye candy, you'd absolutely be wrong. According to sound supervisor Ren Klyce, the shirtless (and maskless) scene was there so that the audience could understand exactly how the force was linking the two characters. According to The Last Jedi sound supervisor,
That was important to establish what she was actually seeing. Was she hearing his voice or seeing his face or just his eyes? And so that [shirtless scene] is to inform the audience, 'Oh, she can see his body.'
So, yeah, Adam Driver doesn't look half bad with his shirt off. Regardless, we got the shirtless scene so we could understand that Rey was seeing Kylo Ren as well as hearing him. It wasn't just for the humorous exchange that followed, which involved Rey asking Kylo Ren to put a shirt on. It also wasn't because director Rian Johnson thought Star Wars: The Last Jedi would excite the audience more if there was a shirtless scene. And a lot of fans have definitely thought the scene was a notable addition.
Along with Ren Klyce, Star Wars: The Last Jedi editor Bob Ducsay also told the Huffington Post that giving the audience the experience of Rey seeing Kylo Ren with his shirt off was a good thing for the overarching plot. He noted that it helps the audience to "understand the rules" of the force connection, also saying,
Ultimately, it's just good storytelling if the audience is learning things the same time the characters they're following are, instead of ahead or behind.
Star Wars: The Last Jedi takes a lot of chances. Ultimately, Snoke reveals to both Rey and Kylo Ren that he was the master puppeteer behind the connection between the two characters, and it's a moment that incites enough anger in Kylo Ren that he turns on Snoke. The force scenes in general are also important for Rey, because they help to show her the other side of Kylo Ren, the vulnerable side, the side that still has the ability to make choices that adhere to the light side of the force. Ultimately, the two diverge paths again at the end of Star Wars: The Last Jedi, but they have been irrevocably changed by the experiences---and the hopes and stories--they shared with one another, and that will likely come back into play during Star Wars: Episode IX. We'll have to wait and see.