I would say it's not necessary to thank someone in western culture (I am from Sydney Australia). However your host would most likely appreciate a thank you, so I think it would be good to do so.
In regards to how you should do this, I think in general, the formality and method of saying thanks should match your relationship with the person, the formality of the event and the formality of the invite. Basically depending how the invite was communicated to you, a host would generally be comfortable with a similar mode of communication in reply. Here are a few examples:
- The host called you: Then you could call them back and thank them.
- Email/IM (Facebook, WeChat, Whatsapp etc): A message via the same medium, or an alternative version of these.
- Face to Face: If you see them regularly then thank them that way. If not, consider an alternative method to ensure you can do it soon after the party. Instant messaging may be a good way of achieving this as it is a non-commital (ie doesn't require extended conversation) method of communication.
- Mutual Friends: You said it was a friend but thought I'd be thorough. Ask your mutual friend to pass on your thanks.
A further consideration you may want to make when considering the nature of your reply: Consider matching the formality of your reply to the formality of the occasion that you attended. If the event was casual/informal, then your reply could be quite casual, something along the lines of:
- "Hi X how's it going. That was a lovely lunch we had on the weekend. The food/company was great"
If it was something more formal then perhaps a longer more formal (an email etc).