This all depends on the stakes, but Hillbilly's on the mark, especially for $50NL and up. $10NL and down you're gonna really have to watch for calling stations that will play any Ace or suited King.
You're always hoping for a set, but by raising you 1) take control of the hand (I raise 22, get called by 99, flop misses us both and I c-bet, you ??) and you start building the pot for those times you do hit your set.
Flat calling someone else's raise, even OOP is fine too, 'cause there again you're looking for your set, you miss, you fold (unless you think a float will work).
Limping from early/mid can be okay, but as Hillbilly says, what do you put someone on who's limped from early or mid? Again, the stakes (and thereby your opponent's implied abilities) are a factor, as are stack sizes (you don't get implied
odds calling a short stack raise with low pairs).
Take a look at Chuck's recent video analysis of Tygran's hand history in the video section of the forum for examples.