When does homology represent an embedded sphere? If we have a triangulation of a manifold $M$ of dimension $i$ and we have simplicial homology $H_i(M)=\mathbb{Z}$, what is the condition than there exists an embedded sphere $S^i$ that generates the homology group? We could also have that $H_i(M)$ is of higher rank, when do there exists spheres that generate a $\mathbb{Z}$ factor? Does this question even make sense and can the answer be simpler in case when $M$ is of low dimension, 2 or 3, or $i$ is low, 1 or 2?
 A: (I'm assuming that the dimension $\dim(M)$ should have been different than the dimension of the homology class--otherwise this can only happen if $M$ is the disjoint union of $S^i$ with some other manifold.)
This is a very classical question. Here are some things you can say about it:


*

*In order for this to be possible, your element in $w \in H_i(M)$ needs to be in the image of the Hurewicz map
$$\pi_i(M) \to H_i(M).$$
This is simply not always possible. For example, there is an exact sequence involving group homology:
$$
\pi_2(M) \to H_2(M) \to H_2(\pi_1(M); \Bbb Z) \to 0
$$
This means that the image of $w$ in $H_2(\pi_1(M); \Bbb Z)$ needs to be zero.

*If $M$ has no homotopy groups below degree $i$, $w$ is always in the Hurewicz image: this is the Hurewicz theorem.

*One necessary condition on your homology class is that it must be primitive: the diagonal $\Delta: X \to X \times X$ takes $w$ to $i_*(w) + j(w)$, where $i$ and $j$ are inclusions $X \to X \times X$ as horizontal and vertical slices.

*After finding whether your homology class comes from homotopy, you need to check whether it comes from an embedding. If $i < \dim(M)/2$, I believe that this is always possible by a variant of the Whitney embedding theorem (you perturb your map to be a smooth embedding).

*It gets very difficult and situational if $i \geq \dim(M)/2$. For 3-dimensional manifolds, the sphere theorem allows one to find nonzero elements of $\pi_2(M)$ coming from embedded spheres, but this is a tough theorem.
A: As mentioned in Tyler Lawson's answer, the homology class $w \in H_i(M)$ in question needs to be in the image of the Hurewicz map so that there is at least a continuous map $f : S^i \to M$ with $f_*[S^i] = w$. But when is $f$ homotopic to an embedding $g$? Note, requiring $g$ to be homotopic to $f$ ensures that $g_*[S^i] = f_*[S^i] = w$.
I found the following theorem of Haefliger in An Introduction to Contact Topology by Geiges, namely Theorem $8.2.6$ (i).

Theorem: Let $V$ be a closed, connected manifold of dimension $s$ and $M$ a manifold of dimension $m$. Let $f : V \to M$ be a (continuous) map such that the induced homomorphism $f_{\#} : \pi_j(V) \to \pi_j(W)$ is an isomorphism for $j \leq k$ and surjective for $j = k + 1$. Then $f$ is homotopic to an embedding if $m \geq 2s − k$ and $s > 2k + 2$ (equivalently, $m \geq 2s − k$ and $2m \geq 3s + 3$).

The reference given is: A. Haefliger, Plongements différentiables de variétés dans variétés, Comment. Math. Helv. 36 (1961), 47-82.
When $V = S^s$, we obtain the following corollary (Corollary $8.2.7$ (i)).

Corollary: Let $M$ be an $m$–dimensional manifold. If $2m \geq 3s + 3$ and $M$ is $(2s − m + 1)$-connected, then any map $S^s \to M$ is homotopic to an embedding.

For example, when $m = 5$ and $s = 2$, we see that $w \in H_2(M)$ can be represented by an embedding if and only if it can be represented by a continuous map $S^2 \to M$. If $M$ is simply connected, this is always the case by the Hurewicz theorem.
A: Here is a quite instructive example. 
If $\iota:\mathbb{S}^1\to\mathbb{S}^5$ is an embedding, then it follows from the Alexander duality that $H_3(\mathbb{S}^5\setminus \mathbb{S}^1)=\mathbb{Z}$. The homology of
$\mathbb{S}^5\setminus \mathbb{S}^1$ does not depend on the embedding. If $\iota$ is a smooth embedding, then a generator of $H_3(\mathbb{S}^5\setminus \mathbb{S}^1)=\mathbb{Z}$ is given by a smooth embedding of $\mathbb{S}^3$, namely by a $3$-sphere that is linked with $\iota(\mathbb{S}^1)$ with the linking number $1$.

However, one may find a toplological (highly non-smooth) embedding
  $\iota:\mathbb{S}^1\to\mathbb{S}^5$ such that
  $H_3(\mathbb{S}^5\setminus \mathbb{S}^1)=\mathbb{Z}$ is not
  generated by an embedding of $\mathbb{S}^3$, because
  $\pi_3(\mathbb{S}^3\setminus\iota(\mathbb{S}^1))=0$.

For a construction of such an embedding, see
https://mathoverflow.net/a/316175/121665 and a comment by Ian Agol.
