Then when he says, for God is at work in you, both to will and to work, he strengthens their confidence, and he excludes four false opinions: the first is the opinion of those who believe that man can be saved by his own free will without God's help. Against this he says: For God is at work in you, both to will and to work: "The Father who dwells in me does his works" (Jn. 14:10); "Apart from me you can do nothing" (Jn. 15:5).
The second are those who deny free will altogether and say that man is necessitated by fate or by divine providence. He excludes this when he says, in you, because He m...oves the will from within to act well: "Thou hast wrought for us all our works" (Is. 26:12). The third, like the first, is that of the Pelagians who say that choices are in us, but the performing of works in God, because willing comes from us, but accomplishing comes from God. He excludes this when he says, both to will and to work: "It depends not upon man's will," i.e., without God's help, "or exertion, but upon God's mercy" (Rom. 9:16). The fourth is the opinion that God accomplishes every good in us and does this through our merits. He excludes this when he says for his good pleasure, and not our merits, because before we get God's grace there is no good merit in us: "Do good to Zion in thy good pleasure" (Ps. 51:18).
Source: Commentary on Philippians