Driving piezo buzzer from MCU pin

I would recommend to use a transistor, even when the required current is low. A piezo buzzer is highly capacitive, and microcontroller outputs usually can drive only small capacitances.

For the speaker you also want the transistor. The reason why your setup only produces very low sound volume is that the resistor and speaker form a voltage divider, so that the speaker only sees \$\dfrac{8}{8 + 500}=1.5\%\$ of the microcontroller's output voltage. You have to place a flyback diode over the speaker.


Piezo buzzers are capacitive. These don't show a typical 8R impedance as magnetic speakers. If you really want great sound try to drive the piezo with a semi-bridge configuration = 2 outputs from your MCU driving each pin of the piezo. To make it work, you have to send a square wave on both outputs but with a phase difference of 180º, that is: one negated to the other. With this trick you can double the applied voltage to the piezo, which is the most sensitive parameter on these devices along with the frequency of oscillation.