Answer:
There is no such thing as a thinking cap in Harry Potter. However, there is something similar: the diadem of Rowena Ravenclaw, which we learn about in the last book (Harry Potter and the Deathly Hallows).
A diadem is sort of like a tiara. Rowena Ravenclaw -- who was one of the four founders of Hogwarts -- valued wisdom and knowledge above all other personality traits, and so she invented a diadem that helps enhance a person's wisdom. It works the same way a thinking cap does (or, would, if they existed): you put it on your head, and it helps you think better. There is only one diadem like this in the Harry Potter world.
You could also consider the Sorting Hat one but it isn't technically a thinking cap. It doesn't help you think better, which is what a thinking cap is supposed to do. Rather, it peers into your soul and decides what House -- Gryffindor, Hufflepuff, Ravenclaw, or Slytherin -- you belong in.