Hi,
There is one more thing to consider with respect to the MCU pins.
The MCU will have a max current spec for each pin but will also have a max current spec for all of the pins. It could be something like 100ma or 200ma for the whole package. That means that if you have a 100ma limit and you have 10 pins putting out 10ma all at the same time, you have reached the max for that chip even though each pin is rated for 40ma.
The transistor circuit is often called an "emitter follower" or "voltage follower". That means that the emitter voltage follows the base voltage to a certain degree of accuracy. There is usually about a 0.7v drop though. That means if you apply 5v to the base you will get about 4.3v or so at the emitter, after the cap fully charges.
Since the base emitter diode is of fairly low impedance, that means that the MCU pin pretty much drives the capacitor almost directly. When the cap is discharged, that means the MCU pin would be putting out the maximum that it could given the internal structure of the output pin driver. It will most likely be higher than the max for that one pin, so a limiting resistor would be a good idea as others have pointed out. Since the voltage difference during that time would be roughly 5v, a 470 Ohm resistor in series with the base would limit the current to around 10ma. The time to charge the capacitor then, assuming the collector was tied to the +5v rail, would be the base resistor divided by the beta (maybe 50) times the cap value times 5, as an approximation, which is the time to charge to about 99 percent of max.
Now if you remove the transistor, the MCU pin charges the cap through a 470 Ohm resistor. The time to charge then is approximately the base resistor value times the cap value times 5. Since without the transistor we lose that divide by 50, that means with the transistor the cap charges about 50 times faster than without the transistor. However, either way may work for the application. It's only if you need faster charging times that you need the transistor. Note that if the beta of the transistor is 100, then it would charge 100 times faster than without a transistor, but if it was only 20 then it would only charge 20 times faster than without the transistor. In practice it will be a little slower though because the transistor apparent beta actually decreases gradually as the cap charges.
In effect we are talking about a charge time of 0.075 seconds with no transistor, and about 0.004 seconds with a transistor that has a beta of about 20. With a beta of 50, we are talking about 0.002 seconds approximately. If 0.075 seconds is acceptable, then you don't need a transistor but you always need that resistor of about 470 Ohms.
Also interesting is if you can get away with a slight decrease in output voltage, you can use a 1k resistor, and that will take about 0.15 seconds to charge, but will strain the MCU pin even less. The output voltage will not get up to max though because of that 8k resistor load.
One more little detail. You have to watch out for the max output voltage of the MCU pin because it may not reach up to exactly 5v, it may only go up to 4.5v or something.
So that's pretty much the long and the short of it.