What are the advantages and drawbacks of each op-amp attenuator topology ? Which one would you use ?
Resistor divider followed by a buffer :
Inverting op amp attenuator :
As the comments say, it depends on what you want to do. But I want to point out a dangerous thing about your second circuit: if you run with a gain of less than unity, the op-amp may oscillate.
Many op-amps are specified as "unity-gain stable" but they will indeed oscillate if your gain is less than unity. TL074 / 084 is an example.
Other op-amps such as the NE5534 are stable only with gain greater than 5. If you run a NE5534 with gain less than 5, it will oscillate.
There is a cure for this oscillation problem - you have to add noise gain to the circuit. You do that simply by adding a resistor from the op-amp (-) input to ground such that the gain of that resistor and feedback resistor is at least unity. Then you can have a larger input resistor (R2) for gain less than unity.
I ran into this exact problem almost 30 years ago and either EDN or Electronic Design did a good article on the problem some time after that. By then, I had already figured out what the problem was and fixed it but the magazine article went into a lot of detail that I hadn't thought about.
Jim Williams advice* was to "Always invert, unless you can't."
That said, I made a switched attenuator stage and found the non-inverting was easier.
*From one of his "Analog Circuit Design" compendiums.