There are a lot of articles on this page, if isomorphic fundamental groups imply some conection between the corresponding spaces, such as homotopy-equivalence. I know a lot of counter examples to this statement, e.g. lens spaces which are compact manifolds and have the same homotopy groups and dimensions, but they are not homotopy-equivalent.
The best theorem, about this subject is in my opinion the Whitehead theorem which states:
If a map $f :X\to Y$ between connected CW complexes induces isomorphisms $f_\ast :\pi_n(X)→\pi_n(Y)$ for all $n$, then $f$ is a homotopy equivalence. In case $f$ is the inclusion of a subcomplex $X\hookrightarrow Y$ , the conclusion is stronger: $X$ is a deformation retract of $Y$. (cf. Hatcher, p. 346)
Now I have at least two questions:
1.) Can we recover a space from its fundamental group under certain conditions?
I am not interested in trivial answers, but I would like to know, how "good" (i.e. how general) these conditions can be.
2.) Is there another statement, like the one of Whitehead, which gives us the opportunity to find a connection between spaces, if their fundamental groups are isomorphic?
I believe you want to know if one can recover the homotopy type of a space knowing its fundamental group since you always attach to a space a contractible space without changing its homotopy.
To answer you question, the homotopy type of a $K(\pi,1)$ space is determined by its fundamental group.