Does $\pi_1$ have a right adjoint?
Let $\mathcal{C}$ be the homotopy category of connected pointed CW complexes. Then the functor $\pi_1:\mathcal{C}\to\mathbf{Grp}$ does indeed have a right adjoint. The cleanest way to define it is to use the simplicial classifying space functor $B:\mathbf{Grp}\to\mathcal{C}$. For the unit of the adjunction you need a natural homotopy class of maps $X\to B(\pi_1(X))$. This can be done by obstruction theory, by induction up the skeleta of $X$. Alternatively, one can define a more canonical map from $|SX|$ (the geometric realisation of the singular complex) to $B(\pi_1(X))$ by simplicial methods, and then use the fact that there is a natural map $|SX|\to X$ which is a homotopy equivalence when $X\in\mathcal{C}$. The first place I would look for more details would be Peter May's old book on simplicial objects in algebraic topology.
In the more general setting the answer is no. Left adjoints preserve colimits and it is not true that $\pi_{1}(X\vee Y)\cong \pi_{1}(X)\ast\pi_{1}(Y)$ for all spaces $X,Y$ (even compact metric spaces). For instance, if $(\mathbb{HE},x)$ is the usual Hawaiian earring, let $X=Y=C\mathbb{HE}=\mathbb{HE}\times I/\mathbb{HE}\times\{1\}$ be the cone on the Hawaiian earring with basepoint the image of $(x,0)$ in the quotient. It is a theorem of Griffiths that $\pi_{1}(C\mathbb{HE}\vee C\mathbb{HE})$ is uncountable and not the free product of trivial groups.
This question was answered a long time ago, but let me mention a couple of relevant papers which invest on Fosco's intuition and partially confirms it.
Paul C. Kainen, Weak adjoint functors. P.C. Math Z (1971) 122: 1.
The main point of the paper is the observation that $\mathsf{K}( -, n)$ is a weak adjoint for $\pi_n$. The paper insists many subtleties, like (non-)preservation of limits and (non-)functoriality of the weak adjoints. Very soon Kainen changed research topic, but it is worthy to mention also the paper below.
Paul C. Kainen, Universal coefficient theorems for generalized homology and stable cohomotopy, Pacific J. Math. 37 (1971) 397– 407.