I thought it best to bet in order to avoid allowing a free card to either a flush or straight.
Betting the flop is not terrible, and its true, that you can get value from draws. You are not getting that much value though, because some draws like the nut flushdraw have extra outs, so they have near coinflip
equity. Also if you check out of position, draws will often bet, and then you get your value anyway.
Maybe I should bet higher on the flop?
No. This is probably from a "protection" standpoint, but you can not make draws fold on the flop. So betting large just bloat the pot more, when you have a hand, that would generally prefer a cheap showdown.
What if he has an underpair and is making a sneaky move?
This is exactly the point of checking. If you check to him, he might take a stab with low equity hands like an underpair. But if you bet, he is either going to fold those hands or maybe now and then raise them as a
bluff. If he fold, you only win a small pot, and if he raise, his bluff will usually end up working.