[Phl 2:12-16 CSB] (12) Therefore, my dear friends, just as you have always obeyed, so now, not only in my presence but even more in my absence, work out your own salvation with fear and trembling. (13) For it is God who is working in you both to will and to work according to his good purpose. (14) Do everything without grumbling and arguing, (15) so that you may be blameless and pure, children of God who are faultless in a crooked and perverted generation, among whom you shine like stars in the world, (16) by holding firm to the word of life. Then I can boast in the day of Christ that I didn't run or labor for nothing.
[Phl 2:12-16 MGNT] (12) ὥστε ἀγαπητοί μου καθὼς πάντοτε ὑπηκούσατε μὴ ὡς ἐν τῇ παρουσίᾳ μου μόνον ἀλλὰ νῦν πολλῷ μᾶλλον ἐν τῇ ἀπουσίᾳ μου μετὰ φόβου καὶ τρόμου τὴν ἑαυτῶν σωτηρίαν κατεργάζεσθε (13) θεὸς γάρ ἐστιν ὁ ἐνεργῶν ἐν ὑμῖν καὶ τὸ θέλειν καὶ τὸ ἐνεργεῖν ὑπὲρ τῆς εὐδοκίας (14) πάντα ποιεῖτε χωρὶς γογγυσμῶν καὶ διαλογισμῶν (15) ἵνα γένησθε ἄμεμπτοι καὶ ἀκέραιοι τέκνα θεοῦ ἄμωμα μέσον γενεᾶς σκολιᾶς καὶ διεστραμμένης ἐν οἷς φαίνεσθε ὡς φωστῆρες ἐν κόσμῳ (16) λόγον ζωῆς ἐπέχοντες εἰς καύχημα ἐμοὶ εἰς ἡμέραν Χριστοῦ ὅτι οὐκ εἰς κενὸν ἔδραμον οὐδὲ εἰς κενὸν ἐκοπίασα
My answer here is not to provide an interpretation of the meaning of "word of life". I try to explain how the verse 16a make sense in the context.
First of all, let me restructure the sentences from verse 14-16 using the NIV translation.
Do everything without grumbling or arguing, so that you may become blameless and pure, “children of God without fault in a warped and crooked generation.”
Then you will shine among them like stars in the sky as you hold firmly to the word of life.
And then I will be able to boast on the day of Christ that I did not run or labor in vain.
Verse 15b and 16a will make a lot more sense when we read them together. But it still has some difficulties how to relate "hold firmly" to "shine like stars". Surprisingly, the Chinese Bible provides an insight, though it's translation was focus on the context flow, rather then the exact meaning of the Greek word. Translated to English, the Chinese Bible had the 15b & 16a as follow
Then you will shine among them like stars in the sky as you manifest yourselves the word of life.
Resolving the connection, verses 14-16 can be interpreted as below;
Paul exhorted the Philippians remained holy in this crooked generation.
So that their righteousness was surely (hold firmly) to be seen like stars shining in the sky.
And Paul would be rejoiced to see his pastoral care to the Philippians was fruitful in Christ.
Paul said "holding firm to the word of life", he meant "holding firm our righteousness" so that we would shine in the world as stars shining in the sky.
The only two possible meanings are Christ (Word of God, but God is life) and the gospel of Christ. But Paul was not given to John's language, so the gospel makes a bit more sense. Then the KJV "hold forth" rather than "hold fast" should be used.
There is basically an equivalence between "hold forth Christ" and "hold forth the gospel", so perhaps this is hair splitting.
Philippians 2:16 (KJV 1900)
16 Holding forth the word of life; that I may rejoice in the day of Christ, that I have not run in vain, neither laboured in vain.
Hermeneia lays out the reasoning nicely:
“holding out the word of life, so that I may have a boast in the Day of Christ.”42 The verb translated “holding out” is ἐπέχω. It can mean either “to hold fast” or “to hold out,” as in “to offer.” Both meanings make sense here, but given Paul’s earlier criticism of the Philippians for not continuing to proclaim the gospel (see my comments above on 1:25–26), “to hold out” may be the better translation.43 Supporting this interpretation is Paul’s use of the expression “word of life” (λόγος ζωῆς), which echoes “word [of God]” (λόγος [τοῦ θεοῦ]) in 1:14, where Christ-believers in Rome are praised for daring “to speak the word [of God] without fear.” The content of Paul’s eschatological “boast” would then be that his preaching of the gospel to the Philippians has been effective: “that I neither ran in vain nor labored in vain” (cf. Phil 4:1; 1 Thess 2:19–20). If despite the current ordeal the Philippians will take a public stand for the gospel (cf. 1:27b–28a), then they like Paul will be saved (2:12; cf. 1:19), the gospel will have been advanced (cf. 1:12), and Paul’s mission will have achieved a lasting result. As already noted, this statement forms a modest clausula that signals the end of Paul’s present line of thought.44
 Paul A. Holloway, Philippians: A Commentary, ed. Adela Yarbro Collins, Hermeneia—A Critical and Historical Commentary on the Bible (Minneapolis, MN: Fortress Press, 2017), 135.
Paul is probably referring to the "Sword of the Spirit", as referenced in The book of Ephesians chapter 6 verse 17, when he says,'“holding firm to the word of life”?
New International Version (NIV)
Take the helmet of salvation and the sword of the Spirit, which is the word of God.
John 6:63 reads,
It is the Spirit who gives life; the flesh is no help at all. The words that I have spoken to you are spirit and life.
One can recognise from the above text that the "Spirit is life",and from Ephesians 6:17 that the Sword of the Spirit is the "Word of God".
If the Spirit is life, and the word of God is the sword of the Spirit,then i think it is reasonable to say that,when one takes a hold of the "Sword of the Spirit", they are in fact,
“Holding firm to the word of life” and also,
"Holding firm to the Sword of the Spirit"