Wilfred Owens is one of several poets known as the "trench poets"--a group of men who were actually involved in combat who wrote realistic, non-romanticized poems about what really goes on in battle and in the life between battles. The trenches they dug, fought from, and lived in were disgusting, muddy, damp, smelly (littered with human waste and corpses), unsanitary hell-holes. There was nothing glorified, dignified, or honorable in the way these men lived their day to day lives.
The occasion of the poem "Dulce et Decorum est" is the aftermath of an actual WWI battle where a man has not gotten his gas mask on quickly enough and the others have placed him in a wagon to carry him back to camp with them. He describes how the man is gurgling and his eyes are writhing and it is not a good death.
Owens uses this description to let the world know that the romanticized views of war and fighting for your country is NOT the wonderful, patriotic, honorable thing they want you to believe. He says the whole thing is horrible, destestable, and hell on earth. There is nothing about it that is romantic or rosy.
One of the horrible ironies of his work as a trench poet is that Owens dies eight days before WWI is declared over.
The literal "occasion" is the moment and aftermath of a mustard gas attack on troops during a battle in World War I.
Mustard gas has a particularly horrific effect on its unfortunate victims. On exposed skin, it burns as badly as as "fire or lime" (lime, a chalky mineral, burns skin as well; line 12). If inhaled, a person's lungs fill with fluid until he literally drowns. The speaker recounts the unforgettable horror of watching a fellow solider succumb, "as under a green sea, I saw him drowning / In all my dreams, before my helpless sight, / He plunges at me, guttering, choking, drowning" (14-16).
The other "occasion" is the poet taking the opportunity to denounce the perceived "glories" of war. The Latin title, "Dulce et decorum est," means "it is sweet and good to die for one's country," making the title highly ironic given the poem that follows.