The difference is subtle and somewhat based on context. I don't think most native English speakers would put much thought into either one, nor notice much of a difference in meaning, if any.
To all the joy we've shared and everything we've done!
The word "to" indicates that "all the joy we've shared..." is the recipient of something. For instance if this phrase was used in a toast, it would be the recipient of the speaker's toast.
"Thank you all for joining me this New Years. Let's have a toast! To all the joy we've shared and everything we've done!"
For all the joy we've shared and everything we've done!
The word "for" indicates that "all the joy we've shared..." is the reason we are doing something. It is the same principle as the idiom "for the love of God", which taken literally would mean the reason you are doing something is to receive God's love in return.
"Farewell everyone. For all the joy we've shared and everything we've done, I thank you."