In an interview after the event, The Kansas City Star asked him to clarify the remark.
“His voting record … is more to the left than the announced socialist in the United States Senate, Bernie Sanders of Vermont,” McCain answered, according the paper.
Asked if he thought Obama was a socialist, McCain answered: “I don’t know. All I know is his voting record, and that’s what people usually judge their elected representatives by.”
McCain was right not answer the question directly and to refer people to Sanders' and Obama's voting records, let people compare the two for themselves and decide which candidate is more of a socialist.
Here is the meaning of socialism from the dictionary:
1. a theory or system of social organization that advocates the vesting of the ownership and control of the means of production and distribution, of capital, land, etc., in the community as a whole.
2. procedure or practice in accordance with this theory.
3. (in Marxist theory) the stage following capitalism in the transition of a society to communism, characterized by the imperfect implementation of collectivist principles.
So, here is Sanders' voting record and here is Obama's voting record.
There you go, everything you need to be able to make that judgment for yourself.