  We study when the heart of a t-structure in a triangulated category
$\mathcal{D}$ with coproducts is AB5 or a Grothendieck category. If
$\mathcal{D}$ satisfies Brown representability, a t-structure has an AB5 heart
with an injective cogenerator and coproduct-preserving associated homological
functor if, and only if, the coaisle has a pure-injective t-cogenerating
object. If $\mathcal{D}$ is standard well generated, such a heart is
automatically a Grothendieck category. For compactly generated t-structures (in
any ambient triangulated category with coproducts), we prove that the heart is
a locally finitely presented Grothendieck category.
  We use functor categories and the proofs rely on two main ingredients.
Firstly, we express the heart of any t-structure in any triangulated category
as a Serre quotient of the category of finitely presented additive functors for
suitable choices of subcategories of the aisle or the co-aisle that we,
respectively, call t-generating or t-cogenerating subcategories. Secondly, we
study coproduct-preserving homological functors from $\mathcal{D}$ to complete
AB5 abelian categories with injective cogenerators and classify them, up to a
so-called computational equivalence, in terms of pure-injective objects in
$\mathcal{D}$. This allows us to show that any standard well generated
triangulated category $\mathcal{D}$ possesses a universal such
coproduct-preserving homological functor, to develop a purity theory and to
prove that pure-injective objects always cogenerate t-structures in such
triangulated categories.
