It's all about how you bias the base of the transistor and its "current gain" versus how much current the LED needs to turn on and off, and how much current the relay coil needs to turn on and off. Ideally, you want the transistor to be fully "on" or saturated when the illumination on the LDR is sufficiently low. And you want the transistor to be fully "off" or non-conducting from emitter to collector when the illumination on the LDR is sufficiently high.
Problem is, the resistance of the LDR varies over a
huge range from fully dark to fully illuminated. Typical values are in the megohm range when left in the dark for awhile, and a few hundred ohms when fully illuminated. The change in resistance is very non-linear as a function of illumination intensity. For this reason, it is difficult to design a simple bias scheme that will apply sufficient bias to turn the transistor ON when the LDR is not illuminated and to turn the transistor OFF when the LDR is illuminated. Your two working circuits demonstrate this difficulty.
The base bias is different in circuits (a) and (c), providing too much base current in non-working circuit (c). The LED stays ON all the time in circuit (c) because the resistance of the LDR does not decrease enough, when illuminated, to decrease the emitter-base voltage sufficiently to turn the LED OFF.
Circuits (b) and (d) use the same bias resistors as circuits (a) and (c) respectively but the relay coil requires more current than the LED to actuate the relay. Sufficient base drive is provided in circuit (d) to operate the relay but it is not sufficient in circuit (b), so the relay actuates when the LDR is not illuminated in circuit (d) but does not actuate in circuit (b).
The relay "drops out" with insufficient current, which (luckily) occurs when the LDR in circuit (d) is illuminated. Decreasing resistance of the LDR in circuit (d) causes the relay to de-actuate (drop out) by decreasing the base drive and hence the collector current of the transistor. However, the LDR, when illuminated, does
not decrease the base drive and hence the collector current to the relay to
zero. This is why the LED in circuit (c) stays ON. However, in circuit (d) which uses the same bias resistors as circuit (c) the illuminated LDR
does decrease the collector current sufficiently to allow the relay to "drop out". This is just a lucky coincidence, not a good circuit design. Changes in any of the components may cause circuit (d) to fail. You also have neglected to include a diode across the relay coil to prevent back emf damage to the transistor that could be caused by a sudden and rapid decrease in the LDR resistance or interruption of power while the relay coil is energized.
As mentioned before, you have not deliberately included any provision for hysteresis in the switching point from daylight-to-dusk or from night-to-dawn. The relay does provide some hysteresis because the pull-in current for its coil is always greater than the drop-out current. Depending on this is not good design practice, nor is it good practice to operate the transistor in a linear mode instead of operating in a switching mode. You would be better served by using a flip-flop circuit, such as the one posted by
@Sunnysky in post #27. And maybe learning a little bit more about how transistors and LDRs and relays work.