The following is something that's always niggled me a little bit. I usually think about stacks over schemes, so I'm a bit out of my element—I apologize if I say anything silly below.
Let $G$ be a sufficiently topological group (e.g. you can assume a Lie group) and let $\mathsf{Spaces}$ be the category of topological spaces equipped with the obvious Grothendieck topology (i.e. coverings are classical open coverings). We then have on $\mathsf{Spaces}$ the usual stack $BG$ of $G$-torsors.
What is the relationship between the stack $BG$ and the space $BG$? Of course, the stack $BG$ is not representable (it's valued in groupoids in a way not equivalent to a stack valued in sets) but one can consider its component stack $\pi_0BG$ (which assigns to $X$ isomorphism classes of $G$-torsors). Now that we have a set valued stack, it's conceivable that this is representable but, of course, it's not—it's not even a sheaf on $\mathsf{Spaces}$.
That said, $\pi_0 BG$ is 'represented' in the homotopy category in the sense that
$$BG(X)=[X,BG]$$
which is, after all, something.
So my general question is: what really is the rigorous relationship? How does it generalize?
Some related subquestions are: should one/can one think about a topology on the homotopy category of spaces? If so, are spaces sheaves there, and can one literally say, in such a setup, that $BG$ (as a space up to homotopy) is just $\pi_0 BG$ (as a 'stack on the homotopy category').
Thanks!
EDIT: Just to give an idea, in the theory of stacks over schemes, one can think of $BG$ as being the stack associated to the groupoid in schemes
$$G\overset{\longrightarrow}{\xrightarrow{\text{ }}}\ast$$
perhaps, in a the same formalism, one can do this as a groupoid in spaces? Then, $BG$ as a space is taking this quotient not in the category of stacks (i.e. the stackification of the obvious groupoid valued presheaf) but taking the quotient in spaces? Of course, one has to be careful since one has to take $\ast$, in such a context, to mean a contractible space with a free $G$-action (e.g. $EG$). I don't know rigorously how this all fits together.