Depends on the situation. I usually look at the stacks around me to determine the play. If there are some short stacks, I ask myself if they are desperate or can they play tight? If they do play tight, if they jam, am I willing to play?
I also look to see how the betting is preflop before it gets to me. If there is a small raise, I might play along just to 'hope for a set'. If I don't hit it, and there's significant betting, I'll happily go away.
If there is no one opening before me, I'll be happy to open for 2.5x-3x the BB. If there looks to be someone who might shove, again, I have to reassess the situation.
For KK and AA, I will play them different than middle pairs. I want to get as much action as possible. If I can get it all in pre, so much the better. If I get it all in pre with KK or AA and lose, I understand it's part of the game. I'm not thrilled, but again, I have to expect it from time to time.