To reiterate and expound on what has been said: The point was to get Luke to come to Cloud City and walk into a trap. If Luke's vision was of Han and Leia having a nice time with Han's old friend, why would Luke feel compelled to save them? So when Han says
They never even asked me any questions
and Leia says
Why are they doing this to us?
it is because Vader knows Luke won't show up unless he senses that his friends will be in pain. Lucas actually explains this in the documentary Empire of Dreams.
Wookieepedia Legends page:
Three years after the Battle of Yavin, Darth Vader again tortured Leia Organa, as well as Han Solo and Chewbacca, on Cloud City. While the torture was not augmented by the Force, Vader knew that their anguish would reach Luke Skywalker through the Force and draw him to Bespin where he could be captured and delivered to Emperor Palpatine. Han was subjected to the scan grid, Chewie to sonic torture and searing lights. Leia, like Han, went through an ordeal with a torture machine, though the specific details are unknown.
Wookieepedia Canon page:
Darth Vader was adept at it: even as a Jedi, he Force choked Poggle the Lesser to gain information on killing the brain worms. He once tortured Han Solo so his pain would reverberate through the Force and draw out Luke Skywalker.
Oddly enough, in the original draft of the script by Leigh Brackett, Vader doesn't torture anyone. In fact, Leia, Han, Chewie, and Lando sit down at the table and have a meal with Vader. Leia asks why he is being so nice to her compared to the treatment she got on the Death Star, and Vader says:
You’re forgetting something, Princess. When we entertained you aboard the Death Star, you had information that we needed. Now you have nothing.
Leia says she doesn't understand why he is there if he doesn't want anything from them. Vader mentions Luke. Then this exchange happens:
But I don’t know where he is... or even if he’s still alive.
He’s alive. And he’ll find you, because he loves you.
That’s ridiculous. He could search for...
He’ll find her. And until then, we wait. I would advise you against any rash moves. I’ve set a guard on the Falcon so there’s no escape that way. I shan’t lock your doors unless you make it necessary.
Luke hasn’t the faintest idea where we are. You must be out of your mind.
Then there’s no need to worry, is there?