Burning down your own house that you own outright and don't have a mortgage or lien on isn't illegal itself.
But if you burn down your home in a town or city that is near other homes and you don't contact the fire department or city beforehand to get permits and permission and already have the fire department on standby there then you could be charged with putting other homes and people at risk.
Or if you burn down your own home to collect insurance then it would be illegal if you try to collect insurance as it's known as insurance fraud and can get you in prison for 5 to 15 years or longer.
But if you're out in a rural place away from other homes and you just set fire to your home and don't collect on insurance then it's not illegal.
It would however be a bad thing to set your home on fire in town where other homes are nearby because you could end up burning a neighbors home down or the whole block of homes down and then you'd liable for the damages.