People sometimes get confused by these two phrases. Their forms seem to be in a past tense but they are really present or future. To say that it's more appropriate to do something than another, we use a phrase, ..had better do something. But, to say that it's more desirable to do something than another, we use, ..would rather do something.
had better
We use had better to give advice, or tell people what to do. The meaning is present or future, not past, but we always use had, not have. After had better, we use the infinitive without to.
It's late! You had better hurry up. (NOT….you have better….) (NOT…you hurrying had better /to hurry up.)
We make the negative with better not + infinitive
You had better not wake me up when you enter my room. (NOT… you hadn't better wake me up….)
would rather
Would rather means 'prefer to'. It is followed by the infinitive without to. We often use the contraction 'd rather: this means 'would rather', not 'had rather'. After would rather, we use infinitive without to.
Would you rather stay here or go home?
"How about a drink ?"
'I'd rather have something to eat.'
The negative form is 'would rather not'.
I'd rather not discuss this in public.
I would rather not do this if I were you.
We can use would rather to say that one person would prefer another person to do something. We use a special structure with a past tense.
would rather + subject + past tense
I'd rather you went home now. My wife would rather we didn't see each other any more. 'Shall I open the window?' I would rather you didn't'