“Had rather” and “would rather” mean the same thing. These two expressions are used to talk about what someone prefers. I’d say “would rather” is used more often than “had rather”.
“You had better do that” means “You should do that” or “It would be wise for you to do that”.