For the first one, people have already answered, for example $X = S^1 \vee S^1$ vs. $X = S^1 \times S^1$.
For the second one you need to be careful about base points! In general "the fundamental group of a space" is not well-defined, you need a base point.
For example if you take $X = \{*\} \sqcup S^1$ (the disjoint union of a singleton and a circle) and $Y = \{*\}$ (a singleton), then $\pi_1(X,*) \cong \pi_1(Y,*)$ are both the trivial group, but $H_1(X) = \mathbb{Z}$ while $H_1(Y) = 0$. It is not even true that if for all $x \in X$ and $y \in Y$ you have $\pi_1(X,x) \cong \pi_1(Y,y)$ then $H_1(X) \cong H_1(Y)$, consider for example $X = S^1$ and $Y = S^1 \sqcup S^1$.
However if the two spaces are path-connected, then $H_1(X)$ is the abelianization of $\pi_1(X)$ and $H_1(Y)$ is the abelianization of $\pi_1(Y)$ by Hurewicz's theorem (for any choice of base points), and so if $\pi_1(X) \cong \pi_1(Y)$ then $H_1(X) \cong H_1(Y)$.
Alternatively you can work with groupoids (if you know what that is). If the fundamental groupoid $\pi(X)$ is isomorphic to the fundamental groupoid $\pi(Y)$, then $H_1(X) \cong H_1(Y)$, again by Hurewicz's theorem.