Circuit works with power supply module, but not when connected directly with a battery?
It's a very common problem. Mostly, because it is very difficult to set up a single transistor to provide hysteresis. Hysteresis is a way of forcing a circuit to stay off until a certain value is reached, but once it is turned on, then a different certain value must be reached to turn it back off. If you didn't do that, then you might have "flickering" behavior or else just a kind of non-linear dimming behavior, rather than a clean on/off behavior.

Here's a two-BJT circuit you can try with \$6\:\text{V}\$. (It would also work with a \$9\:\text{V}\$ battery if you want to use one of those, instead.) Use either the left or right side, depending on the type of BJT you have more of.







simulate this circuit &ndash; Schematic created using CircuitLab

The two BJTs are arranged in a special kind of "comparator" called a "diff-pair" or "long-tailed differential pair." It's a very common arrangement. The left side uses a simple voltage divider that includes the LDR. The right side uses a resistor divider, as well. But in this case there is some "feedback" used from the collector of \$Q_1\$ to change the threshold based upon the on/off state of the circuit. There are really two outputs for this circuit; one which is used for the feedback which is the collector of \$Q_1\$ and the other which is used to drive the LED, itself (the collector of \$Q_2\$.)

If you make \$R_2\$ a little smaller, the LED will be a little brighter. If you make \$R_1\$ a little larger or smaller (percentage wise), then you will change the amount of light needed for a transition. The values of \$R_3\$, \$R_4\$, \$R_5\$ can also be adjusted somewhat. You should feel free to change their values around a little to see how it affects the results. There shouldn't be any harm to the circuit or the LED if you don't change them too much.



If you don't have access to a second BJT, you should definitely buy another. In fact, you should get a few PNP and NPN devices to play with. They are not expensive devices.