Very short explanation:
Aばよかった、means if I did A, it would have been good. It is used when you regret something, and you describe the hypothetical alternative which you should have chosen back then.
Something like, I should have bought a bitcoin.(I regret it, because I would be rich now).
ばいい/たらいい
Is used to give the most emphatic advice. It is often used when asking for advice as どうすればいい?
(what is a good thing to do?)
Sentence:
合格したいのなら勉強すればいい。
たらどう(たらどうですか)
Is also used when giving advice or more like a suggestion, but it might be interpreted as rude(reproach!) because it means “what if you did…”. So use this one if someone actually asked you for an advice. Notice that unlike ばいい you are not actually saying that doing something is good. So it is more roundabout way to suggest something, you can say it is close to “try doing it, it might be fine(but I don’t really know!”.
この洋服をかってみたらどう
You can achieve similar effect of suggestion by using ば、なら、たら alone(with question tag). (very weak suggestion)
A:彼女は許してくれるかな?
B:キスしてあげるなら。。。
ほうがいい
Is the tricky one, because you should use past tense for affirmative sentences, and non-past negative for negative sentences. (actually, you CAN use non-past, it will be weaker advice, but it is not that common)
In addition, it is much stronger suggestion that other options, it is like saying you better do something(or it might end badly for you!).
So you can use it when your friend has unbalanced died, and you want to tell him, you better eat some veggies! (or something bad might happen to you, like hospitalization)
If you want to be more polite, you can use と思う、でしょうか、のではないでしょうか etc
たらどうですか。
たらどうでしょうか。
ばいいと思います。
ばいいのではないでしょうか。etc