For dynamically displaying names on the certificate, you can use the certificate activity
on moodle. You can set the condition for the certificate to be awarded such as completion and passing of a quiz. Additionally, you can even customize the certificate with a custom design.
For the badges, personally I have not come across a way to "dynamically" add the student's name on the badge design itself - as it is a static image uploaded by the admin. Perhaps, for a bit of customization you can explore the modification of the message that goes out from the moodle platform when the badge criteria is met and has been awarded.