Fade in fade out proximity lighting
1) Your approach of switching the whole circuit is a bit strange, though it works in this case.

The base resistor should be small enough that the transistor switches on, but ensure that the transistor base isn't destroyed by excessive current.

(In other words, you are lucky that the output of the sensor is too weak to destroy the transistor.)

2) The sensor wants 5V for its power supply (see "Recommended operating conditions" in the data sheet). The easiest way to get that from 12V is with a 7805 voltage regulator. See the data sheet for suitable input and output capacitors.

3) You can increase the value of R1, but only so much that it still can switch the transistor on. Or you can increase C1, but then the fade out will also get longer.  You can counter that by decreasing R2.

4) It would be better use an Arduino with PWM to dim the lights, then it would be easier get exact control of the timing. The sensor is a good choice for this application, you could hook it to an analog input and program the threshold.