I struggle a bit to get my head around tenses in Mandarin, and in particular when I need to use 了 (le).
Do you have any tips, examples or resources to help me out with this?
Usually 了 is used to indicate past tense (or the completion of). Such as:
but 了 may be used for different reasons, some of which have nothing to do with past tense.
With imperatives, it adds urgency:
So, a negative imperative becomes a warning:
With certain modifiers you can use 了 to indicate future tense:
Here 要 (an auxiliary verb) indicates future tense, by implying the sense of "going to do (something)." 會 is another auxiliary verb that does the same thing, but in the sense of "intending to do (something)."
了 when used after an adjective or noun, conveys the meaning "has become"
Here 了 expresses a clear (change of) state.
了 can also be used to express excessiveness.
太 can be used without 了. If omitted, the tone can sound rather rough.
Personally I think the answers you got here are dangerously imprecise, despite being correct in practice.
Since 了 is often a critical topic for all newbies, I would like to integrate in the following way:
了 expresses completion of an action or change.
That's why you can use it to produce a past tense, as in:
我买了一辆车 = I bought a car 我吃饭了 = I ate Warning: 我吃饭了 is NOT the same as 我吃了 because chinese has a grammatical feature known as "apparent object", but that's another story.
Then you can use it with its other value (change) to express commands (imperative), as in: 闭嘴了 = shut up! 别闹我了= stop bothering me! 我们走了 = let's go 你关门了 = close the door!
and so on. You can do that because a command implies a change in what someone's doing: you're talking (status quo), but now I want you to stop (change); or you are not closing the door (status quo), now I want you to close it (change).
For this reason, the following very common sentences have completely different meanings: 我知道 = I know 我知道了 = I got it (I know it now, but I didn't knew it before)
And then you can use it to express something you're going to do (future) or a decision you just made: 我付钱了 = I'll pay! As opposed to 我付了钱 = I've (already) paid
The presence of other particles can strengthen its soon-to-change valence, as in 要…了： 飞机马上要落地了 = the plane's about to land
我快要毕业了 = I'm graduating soon
And finally some examples to show the difference between past, status quo, change and future change with: 今天下了雨 = it rained today (it's stopped now) 下雨呢 = it rains (it was raining before too) 下雨了 = it rains (now, while it wasn't before) 今天要下雨了 = it's going to rain today
But watch out, because 了 doesn't necessarily express a change that's taking place right now: it might describe a situation that started and hasn't ended yet. Then mix it with the past 了 and you'll have enough to play with for a while:
Change in the past (ending point): 我等了一个小时的车了 = I waited the bus one hour (I'm not waiting anymore)
Change in the past (starting point) 我等车（已经）一个小时了 = I've been waiting the bus for one hour (the wait has started and I'm still waiting)
Hope this helps clarify a little bit!
The particle 了 (le) suggests a completed action. For example,
吃饭了 (chi fan le), finished eating.
了 is often used in the past tense, but should not be confused with 过. 了 implies a recent change that might still be in effect, while 过 is further in the past and is no longer in effect.
You can also use it with 太 to put emphasis on something.