You will receive the ability for BD-1 to hack droids after you complete the Tomb of Miktrull on Zeffo in Jedi: Fallen Order. This is the second tomb on the planet.
Immediately after wrapping up the tomb, return to the Imperial base on the planet. You’re going to come across a small workbench with an upgrade for BD-1, which will let him hack probe droids you encounter.
To hack a probe droid, you need to use Force Pull to bring it toward you. After that, give BD-1 a quick moment to hack the machine to bring it over to your side. It should begin attacking other enemies for you, making your life a bit easier.
The probe droids do not take too much of a beating, so don’t expect them to do much for you during an engagement. When you start a fight, grab the probe droid to bring it over to your side and you should make short work of the other enemies. Despite being weak, they make for a great distraction.
If you defeat one enemy with a hacked droid, you receive an achievement called Don’t Mess with BD-1.