Let $E$ be a generalized cohomology theory. Let's agree that $E$ satisfies property $(*)$ if for any two finite CW complexes with isomorphic homotopy groups their $E$localizations also have isomorphic homotopy groups. Is there some nontautological condition implying property $(*)$?

3$\begingroup$ The only localization I know with this property is rationalization, and of course there is for trivial reasons. $\endgroup$ – Denis Nardin Mar 4 at 6:12

$\begingroup$ @DenisNardin is there some variant of $p$localization/$p$completion that works for nonsimplyconnected finite CW complexes and has the property in the question? $\endgroup$ – Aknazar Kazhymurat Mar 4 at 10:37

2$\begingroup$ @AknazarKazhymurat There is a variant of plocalization/completion for non simply connected spaces, but I doubt it has the property in question (I'm not 100% sure what it does to the fundamental group, but it is quite destructive) $\endgroup$ – Denis Nardin Mar 4 at 10:42
The question is very unlikely to have a satisfactory answer in the level of generality asked. Let $X$ and $Y$ be the two spaces with isomorphic homotopy groups, and let $LX$ and $LY$ denote their localizations with respect to $E$. For certain generalized cohomology theories $E$, we have formulas for $\pi_n(LX)$ and $\pi_n(LY)$, if $X$ and $Y$ are nilpotent, going back to Bousfield's paper The localization of spaces with respect to homology. An excellent summary is provided by Dwyer, and teaches us, for example, that for $E = \mathbb{Z}/p$, one has $\pi_n(LX) \cong \pi_n(X) \otimes \mathbb{Z}_p$, and for any subring $R$ of $\mathbb{Q}$, taking $E = HR$ gives $\pi_n(LX) \cong \pi_n(X) \otimes R$. However, this is only with an assumption about $\pi_1(X)$ (i.e. that $X$ is simply connected, or at least nilpotent). Bousfield's 1997 paper Homotopical Localizations of Spaces gets a similar result for nullification with respect to a Moore space (see Theorem 7.5).
A definitive modern treatment is the book More Concise Algebraic Topology by May and Ponto. On page 395, it says "There are several different ways to generalize to nonnilpotent spaces, none of them well understood calculationally", and later on page 409 says "Little is known about the behavior on homotopy groups of localizations and completions of nonnilpotent spaces."
So, basically, if the OP restricts attention to nilpotent spaces and nicely behaved $E$, then everything should be fine, but it is extremely unlikely to get an answer for general $E$. For counterexamples of what can go wrong for specific $E$, you can look to work of Carles Casacuberta (e.g. Example 4.5 here, or the many examples and counterexamples here).

$\begingroup$ Another good reference is Farjoun's book: springer.com/us/book/9783540606048 $\endgroup$ – David White Mar 9 at 23:18