Starship Troopers is a book that glorifies military service, the idea being that those who have fought for freedom have earned it, whereas others merely passively take advantage of the benefits such fighters secure for them. Starship troopers also features a insectoid foe similar to the Buggers.
Ender's Game is in a sense about the high price of unthinking aggression. Ender is the tool of a military complex who use his ability without allowing him the luxury of understanding what it is he is doing. Beware spoiler that gives away ending of the book
Because he believes that he is fighting a simulator rather than a real enemy, he employs a tactic to win that he would never have used in real life.
Whereas Heinlein's bugs are an adversary with little motivation, and serve merely as a suitably inhuman enemy off which to hang his tale (it might be argued that Heinlein is deliberately minimising the human cost of conflict by so doing), Card's Buggers are revealed as thinking feeling beings genocided by the inability of humans to think outside of their own mindset.
In the case of Card, at least, I'd say that such a reading of the book is a little simplistic. I'm not convinced that Ender's Game is either pro or anti-military. If it is anti anything, it's anti-thoughtlessness. Ender's use of deadly force when threatened by a classmate strongly suggests that Card does view violence as appropriate in some circumstances.
So to sum up the theory probably stems from the fact that they are both books about humanity fighting a desperate war against an insectoid alien enemy. Card reaches different conclusions about how that might pan out from Heinlein, and therefore Card's story is felt by some to be a response to Heinlein. Card's book is a character piece whereas Heinlein's is an adventure story that he has mixed in with elements of his personal philosophy, so I'd suggest it isn't a theory that's well supported by the evidence.