I have a naive question I am asking. Given a higher geometric stack X in the sense of Simpson, Toen etc is it true that there is an affinization Spec Gamma(O_X) such that Hom(X, Spec(A))= Hom(A,Gamma(O_X)) for every affine scheme Spec(A)? Or does this require some more hypotheses. I have very much a hard time finding this out.
Yes -- affinization is defined (as you wrote) as the left adjoint to the inclusion of affine schemes into higher stacks. This left adjoint exists by the ($\infty$-categorical) adjoint functor theorem, since the inclusion of affines into higher stacks preserves all limits (though it certainly changes colimits). Some references for this or closely related notions: Toen's Affine Stacks (here) and Lurie's DAG VIII (available here), where the relevant notion is called "coaffine stacks". There's also a less professional and more informal discussion (in the derived context) in Section 3.2 here.