In some contexts, they are same. E.g. "ของสิ่งนี้เพื่อคุณ" หรือ "ของสิ่งนี้สำหรับคุณ"
Most of the time "สำหรับ" is followed by a noun or an object pronoun.
"เพื่อ" can be followed by a noun, an object pronoun, or a sentence. For me, I use "เพื่อ ... จะ" for "so that".