That transistor can't handle your pump, it can do no more than 200 mA continuous. That 4.8W, 12V pump draws double that.
You need a bigger transistor, and then you may still need the BC547 as driver to get to the approx. 40 mA that switching transistor needs to supply 400 mA. 40 mA is too much for an Arduino to supply directly. Or get a MOSFET instead.
For your moisture probe, don't keep it electrified at all times, or it will corrode(I know it's stainless steel. It still will corrode). Just take your measurement (a few millisecond or so) and switch it off. Also keep in mind that measuring moisture in soil is very inaccurate, and there's a long delay between switching on the pump and that sensor sensing anything. Don't wait for that, time the pump.