I have an accumulation life insurance and I pay the premium every year. What would happen if the insurance company had to be liquidated due to financial difficulties?

The liquidation of a life insurance company is almost impossible. The have a whole safety net to prevent this from happening. Basically, each life insurer must guarantee, by its fortune, all the engagements concluded in its insurance contracts. This is regularly controlled by the Financial Market Supervisory Authority (FINMA).
Moreover, every company has to prove its solvency every day: in other words, its own funds must be sufficient.
The « Swiss Solvency Test » (SST) is here to control this part. To satisfy the requirements of this solvency test, the life insurance company must demonstrate that it could survive the “catastrophe of the century” with enough capital.

Rights of protected insured persons in case of bankruptcy.

If a life insurer went bankrupt despite all these measures, special rules would be applied. Normally, insurance contracts can’t be dissolved by bankruptcy. (art. 55, al. 1 from the federal law on insurance supervision).
The current contracts and their coverage available in the assets would be transferred to another insurance company or liquidated: in the first case, your contract would continue as it stands with the other company; in the second case, you would receive the surrender value concluded.
All claims based on insurance contracts would be covered by the proceeds of the assets, which are protected against claims from other creditors because they cannot be paid into the bankruptcy estate.