When the infinitive expresses purpose (i.e. when English could employ in order to), the use of om is obligatory; otherwise it is generally optional. In the latter case the use of om tends to be preferred when an object or adverbial comes before te.
Het heeft geen zin (om) te wachten.(optional use) ― It is no use to wait.
Het heeft geen zin (om) de hele dag te wachten.(preferred use) ― It is no use to wait all day.
The use of om is ungrammatical after some specific verbs, e.g. durven(“to dare”).