Moisture sensor - Why it needs a transistor/capacitor?

I like the second circuit - very simple, takes advantage of the high-input impedance of the Arduino inputs. That capacitor is an issue though, much larger than needed (and large value capacitors can have significant leakage currents) - something like 1uF ceramic or tantalum would be fine, perhaps even 0.1uF (the break frequency for the original circuit is something like 0.05Hz, the kind of noise interference you'd worry about would be far higher in frequency (50 or 60Hz mains and radio-frequencies).

One problem with these DC circuits is that the +ve soil probe will be electrochemically dissolved over time (over several years) and need replacing. Using an AC resistance measuring circuit is a superior technique with much less electrochemical erosion over time - but not as simple. As a compromise if the 5V supply to the circuit is provided from an Arduino pin then you can turn it off between measurements which will reduce the average current flow a lot.