I would just like to add to the above answers in that "thanks to" can also be used in a sarcastic way.
Ex: "Thanks to Bob, we all have to stay after work for the sexual harassment meeting."
Most people don't enjoy staying after work, and they especially don't enjoy staying after to listen to a speech about something that should be common sense (sexual harassment is bad.. who knew..). So, in this case, the "thanks" is insincere and sarcastic.