For starters you need to define what a C-bet actually is.
If you flop top pair or better, you are no longer C-betting, you are value betting. It is important to realise the distinction, because in order for your C-bets to work they have to look like value bets.
So, the scenario is: action has folded to us in late position and we have opened with a raise. One of the blinds calls and then checks the flop.
We have: A♠ J♣
Board 1: J♦ 9♦ 3♠
This is a clear value bet. We have TPTK and a whole bunch of weaker hands can call us.
Board 2: K♥ 7♠ 2♣
This is an obvious C-Bet spot. Villain won't have hit this board very often, but from his point of view we could easily have a king. Our C-bet achieves two objectives. First, we force villain to fold a bunch of hands that have equity against us, eg Q♦ 10:diamond:. We prevent them from seeing the turn for free and potentially catching a pair to take the lead. The second objective is we can actually fold out hands that are ahead, eg 5♦ 5♣
Board 3: 10:spade: 9♠ 8♦
This spot we are C-betting as well. Although we technically only have ace high, we still have a lot of equity with an up and down straight draw, two over cards and a backdoor nut flush draw. Even if Villain calls with a hand like K♥ 10:heart:, we can catch a lot of cards on the turn to improve.
Board 4: 8♥ 7♥ 5♣
This type of board we can check back. Villain has a lot of medium cards in his range that could have hit this board, but more importantly, we dont have many hands in our range that connect. We are repping high cards by raising preflop so villain is unlikely to fold and may even check raise bluff us with a draw.
In summery, we always bet when:
We have strong equity and villain can call with worse.
We have low equity, but the board appears to favour our range.
We have medium equity and can improve on the turn.
We check back when:
We have low equity and the board favours the callers range.