What is the Chinese way to say "We had a lot of fun"? I know an English sentence cannot be translated into Chinese word-by-word. So is there a idiomatic way to express the same meaning of "We had a lot of fun" in Chinese? (The context-- someone said this to a party host when he is about to leave the party: Thank you for having us. We had a lot of fun.) 

The word "had" is in past tense. So the Chinese equivalent needs to indicate this too.
Past tenths aren't as explicitly stated a lot of times in Chinese as they are in English. 

For instance, your question We had a lot of fun could easily be translated as:

我们今天晚上玩得很开心

we + tonight + play + very + happy

and (assuming that you're not going to parties during the daytime) that would be a perfectly idiomatic, grammatical sentence.

Here 玩得很开心 would be the equivalent of the English had a lot of fun.

Note: 玩 here would sound a lot better er-ized: that is to say 玩儿 and not just 玩.