Most likely they can. I've seen it happen in my city, here in central Florida. However, usually the tearing down of the house is the end of a very long and structured process, during which the owner has numerous opportunities to prevent this from happening.
I spent nine years as a volunteer on my city's Code Enforcement Board. During that time, we had cases like the one you describe. Usually, a case begins with someone, perhaps a neighbor, bringing apparent code violations to the attention of the city. First, the Code Enforcement official speaks directly with the homeowner to point out the violations and explain what can be done to resolve them.
As Joe said, often public safety is at issue. I have seen many instances where an empty, run-down house becomes an "attractive nuisance" that draws local children and teenagers to it like a magnet. Years can go by and the condition of the house deteriorates further. Especially dangerous are rotten or termite-riddled porches that someone can fall through. If the windows and doors are not properly secured, the interior, especially floors and staircases, can present the same hazards. Some of the worst properties have roofs that may cave in as well. There can also be health hazards present, such as birds roosting in the house, and leaving their droppings everywhere. I've seen all of these things.
If the Code Enforcement official and the property owner cannot resolve the code issues, the case may pass next to the local Code Enforcement Board for a hearing. The Board is a citizen group, composed of volunteers.
Appearing before the Board offers an opportunity for the city official and the homeowner to each present their case. The Board normally wants to see that the homeowner is making some attempts to correct the violation, such as repairs, or at the very least, securing the property by boarding up broken windows or putting locks on exterior doors. Often there are extenuating circumstances, such as financial constraints that are hindering the homeowner. The Board may continue the case for one or more months to allow the homeowner time to correct the violations. This step can be repeated several times.
However, if a long time period passes (It could be years.) without the case being resolved, the city may move to condemn the house and tear it down. If the house may have historic value, the city will research that possibility, sometimes through a Historic Preservation Board, before demolition is considered. Nevertheless, even a historic house may be too seriously deteriorated to be saved.
Obviously, demolition is a last resort, when all other alternatives fail. Where I live, the city pays for the demolition, and the property owner is then left with a vacant piece of land. The parcel could be more valuable at that point than it was with the house on it, since anyone contemplating buying it does not have the cost of removing the structure.
I hope this information helps.
Maggie Hawk, REALTOR
Watson Realty Corp.