There is no public transport to Qasr al Kharanah, so the easiest way is to hire a car+driver or a taxi, especially since you can visit some of the other desert castles. Highway 40 is mainly a truck road, with lorries speeding on their way to – so we've been told – Iraq. Given this, and the lack of signage to the castles, having a driver is probably preferable to driving yourself.
I visited Qasr Kharana as part of a tour (only transport) organised from Farah Hotel in Amman. We were three people in the car sharing the price and I paid 13 JD. The places we visited were Qasr Kharana, Qusayr Amra, Qasr al-Azraq and the Wetland Reserve, Hammam Sarah and Qasr al-Hallabat (in the mentioned order).
We had lunch in Azraq and the driver told us about a restaurant were tours could have lunch (and it was cheaper if we came from Farah Hotel, 3,5 JD), but we preferred to have a falafel at a café. They were very tasty and was 250 fils. We asked if it was possible to visit the Wetland Reserve (it was not in the original plan) and the driver was happy because then he could go to the mosque after letting us off at the Visitor Centre.
Though it is in the middle of nowhere, it's quite close to one of the main roads in the country, the one that goes from Amman to Al Azraq , and then to both Saudi Arabia's and Irak's bordiers. So if you are going by car take this road east, and drive about 62 kilometres. There are indications in both arabic and english when you approach the castle and take the short detour that will lead you to it. Also many tourist buses do this route to the "Castles of the Desert".