Both circuits are bad in different ways.
In the first example, you may damage your leds because the current on the leds may not be limited in any way (depends on the hFe of the transistor, if it's fully open or not)
In the second example, you're gonna damage the transistor because you're not limiting the current going into the base pin.
Here's a very good tutorial about npn transistors, that explain how you'd use them as on/off switches. It's best not to use them in the in-between mode, and rely on that to limit the current :
If you want to use the transistor to turn leds on and off, the 2nd circuit will work, provided the base current is high enough (calculate the resistor value by following the video above, but pick a current that is low enough but guarantees the transistor will be fully on)
Then, add a resistor in series with the leds to limit the current. You have the formula V = I x R so with transistor in circuit, this becomes:
Vin - number of leds in series x Forward Voltage - voltage drop on transistor = I x R
If you have a bunch of leds in parallel, you put 1 in the formula, but your current is number of leds x individual current
If you have a bunch of leds in series, you put number of leds in the formula
The voltage drop on the transistor is something like 0.4v .. 0.6v, depends on transistor and it's in datasheet (collector-emitter drop) ...for
SS8050 it's 0.5v
So let's say 5v input, 4 leds in parallel each with 10mA (0.01A) with a 3.2v forward voltage (white led) you'd have
5v - 1x3.2v - 0.5v = (4x0.01) x R => R = 1.3 / 0.04 = 32.5 ohm , so you'd use standard
R24 value of 30 ohm, or 33 ohm
If you want 4 leds in series, you'd need at least 4x3.2v + around 1v for safety, or let's say 14v.
Then formula becomes
14v - 4x3.2 - 0.5 = 0.01 x R => R = 0.7/0.01 = 70 ohms, so you'd probably go with 68 ohm or 75 ohm resistors that are easier to source.
For LTL-307EE you have datasheet here:
https://www.digikey.com/product-detail/en/lite-on-inc/LTL-307EE/160-1701-ND/140833It says typical forward voltage 2.0v, maximum 2.5v and maximum continuous current 30mA
If you go with the maximum forward voltage, then I'd suggest staying to let's say maximum 25mA of current.
How much current you decide on it's up to you, brightness doesn't scale linearly with current. For some applications even 5mA will be plenty.