How to use 了 as a modal particle?
Usage of 了 (le)：

A. auxiliary word (助词)

A.1 used after verb or adj to indicate completion. This usage carries the same sense of "Perfect Tenses" in English.


  Example: 我已经问了老王 / 人老了，身体差了 / 头发白了 / 这双鞋太小了 / 他打开了窗子


A.2 used at the end of a sentence, or in the middle of sentence but right before a pause(usually a comma), to indicate current situation changed or new situation coming up.


  Example: 刮风了 / 下班了 / 开学了 / 天亮了 / 雨大了


B. modal word (语气词)

B.1 to indicate the mood of future certainty.


  Example: 明天又是星期六了 / 要过新年了


B.2 to indicate speeding up or stopping.


  Example: 快躲了! / 别吵了! / 闪开了!


B.3 to indicate interjection.


  Example: 好了! / 累死了! / 弄疼我了!


C. Language Sense (语感)

Each language has its own language sense. By language sense I mean something about language that you can feel if it is good or not. Language sense helps us to know the way how to speak a language in a smooth and natural way, as native speakers do.

For example, in Chinese, we can say: 


  屋里有张桌子，桌子上有几本书。


But translated into English, it will become something like


  There is a table in the room, and on the table there are some books.


In this sentence, the 2nd "the" is needed. Why? Language sense. But in Chinese, there is no need of such article in front of the 2nd 桌子, and we all know that both the 1st and 2nd 桌子 refer to the same table.

Another example:


  After finishing his lunch, he started running out of the house, but tripped on the doorsill and broke his leg.


So why are the 2 "his's" needed? Language sense. Someone may argue that without the 2 "his's", we don't know whose lunch he ate, and whose leg he broke. True, but again why do we need those specifications in English? Language sense.

In Chinese we will say:


  吃过午饭后，他向屋外跑去，可却绊在门槛上摔断了腿。


See, here we don't say 吃过*他的*午饭, nor 摔断了*他的*腿, why? Language sense. If you say 吃过他的午饭后，他向屋外跑去，可却绊在门槛上摔断了他的腿, then it is not wrong, but it sounds very bad, as this is not the natural way native speakers speak.

Chinese is a contextual language, which means a lot info of sentences are hidden in the context. Chinese language also relies heavily on default info (缺省信息 or 默认信息). If no specific info expressed in sentences, then we just interpret them in the normal situation, by drawing info from the same sentence or from context. 

So in some cases, need of 了 is just language sense. You need to get yourself used to it and familiar with it.