好的 can be used to decribe an agreement of a plan, a sugestion, something that has not happened yet.
好了 means, it's enough, something is done, something doesn't need to continue in the future.
However, they both can be used when someone clarifies something that you didn't know,
if you reply with 好的, it implies you'll do soemthig based on what you just learned, if you reply with 好了, it means now you already know what's going on, no need of further explaination.
对了 means by the way, it's used for chaging the topic, 好了 can be used to chage the topic, too, but it means you have enough of the old topic, it shows your impatience.