Water detector with a BC547 and help understanding transistors
1.The 4.7k resistor is a failsafe in case the electrodes touch each other and send too much current through the transistor and destroying it. I've made this mistake already. If the electrodes touch, with the 4.7k resistor in place, only 1.9 mA will pass to the base. How do I know how much current is too much for the base? I've looked at this spec but I don't see a specification for this. Is it the same as the max collector current (100 mA)?
There isn't a good answer to your question. The manufacturer has not addressed the issue of driving so much base current through the transistor that it kills the transistor. At a guess, 100 ma would seem a reasonable starting point, although reducing that wouldn't be a bad idea.
2. If I replace the 4.7k resistor with 1M ohm then the LED burns very dim. How is this happening? Surely the switch is only on and off.
Surely not. As long as the collector-emitter voltage is greater than about 1 volt (and the  emitter current is within bounds) a transistor acts as a current amplifier, with the collector current being more-or-less proportional to the base current. Look at the data sheet and see &quot;current gain&quot;. Also keep in mind that gain varies with current, and in particular drops as current increases past the specified values. It also decreases with decreasing current, too.
Once you get into the situation that Vce is less than about a volt, the gain of the transistor is fairly low. Note that the rating for Vce(sat), the saturation voltage, is specified at a gain of 20. Once you get into this range, small changes in base current have almost no effect on output voltage, and you can use the transistor as a switch.
3. It seems that my tap water provides a resistance of roughly 500k ohms. This means that as little as 18 uA of current is going to the transistor's base, which does indeed switch it on. What current would be too small to work and how would I calculate this number?
That requires a little thought in defining exactly what you mean. What, exactly, does &quot;switch it on&quot; mean? Let's assume that &quot;on&quot; means 2 mA through the LED, AND that it's a white LED. Then it will have voltage drop of about 3 volts. 2 mA through the 1k resistor will produce a 2 volt drop. So Vce on the transistor will be 9 - 2 - 3 volts, or 4 volts.
2 mA of collector current and 4 V of collector current are almost exactly where the gain of the transistor is specified, and you'll notice that the minimum value is listed as 110. So the base current to do this will be 2 mA / 110, or about 18 uA.
Of course, as I mentioned, you need to think carefully about exactly what &quot;switch on&quot; means. If the LED gets 1 mA, and is a little dimmer, is that &quot;on&quot;?
4. The BC547 spec says the max emitter-base voltage is 6 V. Does this mean I need to drop the voltage along this line? Should I plug in a couple of diodes?
Nope, you need to think about exactly what the spec is saying. Note that it is the emitter-base voltage, not the base-emitter voltage. It's referring to the reverse voltage you can apply to the emitter-base pair, rather than the forward voltage, which will be limited to about 0.7 volts by the diode action of the junction. Unless you plan to reverse the power leads on your circuit, you don't need to worry about it.