it means to take attention away from someone who deserves or wants it.
ex.
I passed my medical school exam, but my sister stole my thunder when she told everyone she was pregnant. (I wanted to get attention for doing something great, but at the same time my sister did something that got all the attention, and I got none.)