When you purchase a home, you may be required to purchase homeowners insurance as part of the mortgage contract. Lenders generally make this requirement in order to protect you and their investment against a total loss, and may offer the coverage through a preferred insurance provider at closing.
If you purchase directly from the previous owner, or pay cash for the home, you will not be required to purchase home insurance at closing. Whether the requirement is made, having homeowners insurance in place when you take ownership is the best way to protect the home and your own financial standing. If a storm hits the day you close on the home and causes damage from wind or lightning, lack of insurance could mean that you have an immediate loss before you take up residence.
There is no reason to buy homeowners insurance before you actually own the home, and the effective date of the policy is typically tied to the closing date for that reason. If you do not have insurance when the home is purchased, you should consider buying a policy immediately afterward. Homeowners insurance protects your investment, and every hour that you go without coverage is an hour that you are gambling against a huge financial loss.
If you decide to change insurance companies after buying the initial policy, it is important to set up the new policy to take effect as soon as the old policy terminates. It is not necessary to have overlapping home insurance, and doing so can lead to problems if a claim is filed during the overlapping period, but allowing any period of time to go by without any home insurance leaves you liable for large out of pocket expenses that you may not be financially prepared for.