Which sentence is better? are they same?
- All people are the same to them
- All people are the same for them
Take a clear example:
Republican or Democrat - they both mean the same to John.
That usage is suggestive of an opinion or position held by John. Essentially (as suggested in an earlier comment by @magistermurphy) a subjective one.
Republican or Democrat - they both mean the same for John.
Suggests that, whoever wins, the outcomes will be the same for John. Here the opinion is more objective or, at least, it is being offered as such by a third person
Which is better will depend on context. The distinction is very subtle and almost entirely idiomatic.
I can't find any official information on this, so I can only give the idiomatic impression of a professional writer.
In my writing I would use "all the same to me" to describe the speakers reactions. The "me" is reacting to something, and the reaction is "it's all the same."
I would use "it's all the same for me" to describe the speakers assessment. The "me" is assessing the impact of something on them and their assessment is "It's all the same"
According to Cambridge Dictionaries Online same to you is an idiom and is used as un answer to someone who has greeted or insulted you in order to wish the same thing to them.
Happy Christmas! - The same to you!
Get lost! - Same to you!
As for the same for you it means roughly the same thing, but as Fumble Fingers points out in his comment, accentuates the actual effect/influence.