Position, position,position and texture of the board.
In live play, it depends on how you have read the board and whether you smell weakness.
In online play, I'll give more weight to my image and his image. IE: If I was the initial raisor and I have position...On the flop he bets, (depending on texture of the board.. esp if there's an A and say I have a low pocket).. I might reraise to get him off the hand as that is only one of the two ways of winning that pot.
If I was out of position, and I check it to him and he bets.. depending on the texture of the board again and his image..., I will raise him.. showing him strength..with that check-raise. Here again, I have two ways of winning the pot, he folds here or he flat calls and I might get lucky and hit my 3x on the turn.
I might even get a free card if you check it to him in the above two situations.