According to wikibooks https://en.wikibooks.org/wiki/Japanese/Lessons/Introduction/Ogenki_desu_ka/Yes_and_no
Comparing はい hai, ええ ee, and うん un
はい hai is a polite way of saying "yes" and can be used in almost any situation.
ええ ee is a more colloquial but still polite way of saying "yes" and also carries a somewhat feminine connotation.
うん un is a colloquial way of saying "yes" and is closer to the English word "yeah".