Well, the calculation is quite simple.
We suppose the LED current is 10mA.
The minimum base current is equal
Ibmin=Icmax/hFEmin for BC547B
HFEmin=200
Ibmin=50uA
For ensure that BJT is in saturation we multiply
Ibmin* 2..10,
IB=5*50uA=250uA
And now the base current
Ib=(Voh-Ube)/Rb
Voh=(2/3)*Vcc=6V
Rb=(6V-0.7V)/250uA=21K=22K
Or we can uses another approach.
Bjt will be in saturation if:
Rb≤hFEmin*Rc
So now we can calculate the
RBmax
Rbmax=200*680Ω=130K and again for ensure saturation we uses 2..5 times smaller value.
Rb=22K...68K
PS. In this kind of circuit you should uses the Schmitt trigger gate, because the switch "bounce" and RC low-pass filter to smooths the bounce waveform. The time constant 10ms to 25ms is long enough
R2 and C1 is RC low-pass filter that smooths the bounce of reed switch