You need to know the Hfe parameter of your BJT(gain).

-> BC182L has a HFE(min) of 100.

Here at 20mA, the minimum you may have should be 80.

-> Why 20mA? Because it is the desired current for the load (led used with 9V supply and a 330 ohms current limiter resistor to have 2.4V 20mA)?

To make sure you saturate it properly, some will divide the Hfe parameter by 2, some by 5, and some others by 10.

-> Why? Is this empirical?

Let's use 5, so we have Hfe=16

-> Hm, yes, but why divide it by 5?

The base current is the Collector current/Hfe = 20/16 = 1.65 mA

-> This is the current needed at the BASE to saturate and switch the BJT then?

Assuming your PIC may give 5V at it's output,

-> Right

the base resistor will be
(5-Vbe)/1.65mA = (5-0.7)/1.65mA = 2.606 K...

anything in this range or lower will work.

-> The formulas I found on the web are more complicated and I don't find the same values... ???