Why do humans like being touched? Why do people like to be touched so much, why would it make sense from a evolutionary perspective.

I know people enjoy hugs and company of opposite sex, but even people from the same sex hug and touch each other.

I wonder how this behavior could have evolved. Was it the struggle to keep warm that drawn people physically together? Does it all have to do with mating?

Maybe there just isn't enough data to specify how this behavior started out?
Of all the senses, touch is the one that most connects a person to the external environment. When two people touch each other (a handshake, a hug, a kiss, etc.) a connection/bond is made. This bonding is deeply involved with social development and emotional interaction.

Interpersonal relationships are essential for social interactions. It is important to known where the boundaries are in your culture, so that personal space is respected. This varies widely between cultures and persons.