Most people will have a personal preference for either glass or wood when it comes to coffee tables, often though, what ends up more important than your personal preference is what goes well with the rest of the room’s design.
Ignoring the difference in appearance of the types for the moment, from a practical and functional viewpoint they each have their pros and cons. Glass coffee tables have the benefit of being a lot easier to keep clean, and have no risk whatsoever of getting stained, but a big con for them is that they will break more easily and scratch quite easily too. Wood coffee tables are durable and considerably more practical, but depending upon the type of finish the wood has it could be susceptible to getting stained.
Glass coffee tables can go really well with a well decorated and classy room, while wood is better suited to a more rustic looking room. Glass also goes better with a modern design most of the time, but this mostly depends upon how the type of finish the wood has.