If you are taking out a mortgage to purchase your home, having buildings insurance is usually a condition of the lender granting the loan. Even if you do not have a mortgage on your property, it is advisable to take out buildings insurance as it will protect you from any accidental damage that may occur to your property.
Renters do not need to buy buildings insurance, because it should be covered by their landlord. Contents insurance is not compulsory. However, it is a good idea to prepare for the unexpected.