Great question, yes they do! There was some work done in Sea Rocket that showed it grew roots much more quickly when strangers were there, to try and out-compete them! But it grew much more politely when family was there, to give them a chance. Really amazing. This has only been shown in a few plant species so far, but I would guess that many of them can do it.
The next question is how do they do it! And scientists are still trying to figure that one out. There are probably tiny chemicals that come from the roots that family can recognise in the soil, or tiny compounds in the air that they can sense. Its a bit like how the immune system works – picking up a signal and recognising a pattern. But in this case they are recognising friends not enemies!