BC517 should be OK, it depends on the relay coil current.
If you have a data sheet for the relay it should tell you it's coil voltage and current. You should aim for the correct voltage and make sure the transistor can continuously carry the current with a 50% safety margin. For example, if the coil is 100mA the transistor should be rated no less than 150mA. If the coil current is not specified you can calculate it by measuring the resistance with a test meter and dividing it into the voltage. For example a 5V coil (which appears to be what you are using) measuring 20Ω would draw a current of 5/20 Amps or 250mA.
The value of the resistor in the base pin can be calculated by dividing the voltage it drops by the base current. The base current is the coil current divided by the transistor's gain. For example, if the coil draws 250mA and the transistors gain is 100, the base current would be 2.5mA. The resistor has to drop the PIC output voltage down to Vbe of the transistor which is probably 5V down to 0.6V at 2.5mA so the value would be 4.4/0.0025 or 1760Ω. In Practice use a lower value, I would suggest 1200Ω (1.2KΩ) to ensure the transistor was fully driven.
The diode across the coil only carries a very brief pulse of current at the moment the relay switches off, I would suggest a 1N4001 or similar type.
Brian.