Radar works pretty well in space, due to the lack of atmospheric dust and clouds absorbing the signal, and the lack of terrain to produce spurious echoes, interference, and to block the line-of-sight. Space may be considered the ideal environment for radar to operate in.
How far can radar work in space?
Sounding radars: these are low-frequency (normally, HF - 3 to 30 MHz - or lower) ground-penetrating Radars, used to acquire data about the planet sub-surface structure. Their low operating frequency allow them to penetrate hundreds of meters, or even kilometers, below the surface.
Does sonar or radar work in space?
sonar will not work in space because there is no transmissive medium out there to carry sound waves. Radar works fine in space and has been used to study the surfaces of distant planets.