The two most common types are using hexagons and squares. My question is rather concerned with game design. Why are specifically those two found so often? What are disadvantages that speak against using other polygons such as triangles, pentagons or octagons?
There are very few regular polygons, which can get stacked next to each other seamlessly. These are triangles, squares and hexagons (your question mentions using pentagons or octagons, neither of which can be actually put next to each other seamlessly).
Using hexagons and squares over triangles has a very big advantage: tiles can have the same rotation. When you have triangles, some of those will be upside-down, so you need to draw everything twice if you want to maintain visibility.
You should decide it yourself whether you want to use hexagons or squares. Most computer games use the isometric projection, because it' easier on the math side, and provides a great pseudo-3d look, but board games like catan use hexagons because there's a smoother angle between the connections, so roads don't seem like they have only right angles.
Square grids and pentagon grids offer a way to repeat the same shape in the same pattern in both x and y.
You can make a grid of triangles, but some triangle will point 'up' while its immediate neighbours will point 'down'.
And I have never seen a grid of pentagons or octagons. These shapes are not repeatable easily.
Humans tend to think in Cartesian space, so square grids offer that simplicity, not only for the player, but for the developer too. That's the main advantage with these.
Hexagon grids have the advantage of "reducing" the "unfairness" of movement costs when travelling on diagonal tiles in games where movement cost is important, when comparing to square grids.