Is Renters Insurance Compulsory?

Having insurance when you own your own home is essential, but what about when you are renting an apartment or house, or even renting out your property?