An irreducible representation is real or quaternionic precisely when its character is real-valued. By the Peter-Weyl theorem all characters are real-valued precisely when every element in the group is conjugate to its inverse. When the group is connected a more precise answer is as follows: The Weyl group (in its tautological representation) must contain multiplication by $-1$ and this is true precisely when all indecomposable root system factors have that property. I don't remember off hand which indecomposable root systems have this property but it is of course well known (type A is out, type B/C is in, type D depends on the parity of the rank).