We see the wobble in the star via the frequency of it's light changing.
My understanding is that the assumption of diamond is made by making many measurements of the absorption spectra of the star to try and get an idea of what kind of matter is floating around it as dust and gas and from that trying to work out what the balance of chemistry in that system is likely to be.
You can also look at the star's spectra during a transit of the planet and use that to work out information about the atmosphere and surface.
At the end of the day, they do not know what is inside the planet, this is just their best guess based on what they can measure.