Stealing thunder is to take someone else's idea, using it for one's own advantage or to pre-empt the other party.
The idiom comes from the peevish dramatist John Dennis early in the 18th century, after he had conceived a novel idea for a thunder machine. There is an account of it in The lives of the poets of Great Britain and Ireland by Robert Shiels and Theophilus Cibber:
Mr. Dennis happened once to go to the play, when a tragedy was acted, in which the machinery of thunder was introduced, a new artificial method of producing which he had formerly communicated to the managers. Incensed by this circumstance, he cried out in a transport of resentment, 'That is my thunder by G—d; the villains will play my thunder, but not my plays.'
In a contentious situation, such as a court case, political debate or public relations crisis, it is a tactic used to weaken the force of an adverse point. By introducing the point first and being open about it or rebutting it, the force of the opposition's argument is diminished – their thunder is stolen.