What is 了 doing in the sentence 我出发了?
I'm leaving is rather ambiguous; going from English to Chinese, it is either


I'm getting ready to leave (我在準備出發)
I'm going to leave (我出發了)
I'm in the process of leaving (我正在出發, e.g. if you're waiting on a plane ready to take off)


我出發了 is also ambiguous; going from Chinese to English, it is either


I'm going to leave [now] (我［現在］出發了)
I've already left (我已經出發了)


Context is essential; if 我出發了 is translated to I'm going to leave, then「了」is used as a function where it is put at the end of a sentence to declare (to a listener) the beginning of an action. In this sense, we have:


我走了 (declaration: I'm leaving/going [to go somewhere])
我（去）吃飯了 (declaration: I'm going to have food)
我（去）讀書了 (declaration: I'm going to study)


It is mandatory to drop「去」in verbs which involve going/leaving anyway, such as「走」and「出發」. In other verbs, including「去」is optional, but it reveals the sentence structure better. You can see that in the written language, without explicitly writing「去」, it is hard to see that 我吃飯了 is a declaration of I'm going to have food, but in spoken language the context should be clearer.


  How would the meaning change without「了」?


It is ungrammatical to say just 我出發, like it is ungrammatical to only say in English I leave.