I couldn't attend the party because of illness.

Literal

Illness [because-のために] party [to-に] attending [could-not-できませんでした].

Uses the polite potential negative できませんでした, making this appropriate for explaining an absence to someone in a polite register. Subject omitted.