As you realized, conservation of energy is the key. Destroying buildings takes energy, and that energy has to come from somewhere. It can't come from the buildings themselves (citation: cities do not spontaneously explode1), so it has to come from the weapon. Basically, the weapon has to shoot enough energy to destroy a city into one building.
Physically, there's no problem with having that amount of energy concentrated in a small area. We do it with nuclear weapons, as other answers have pointed out. Now, when a nuclear weapon explodes, the nuclear reaction itself takes something on the order of microseconds. After that time, the explosion is just an expanding ball of hot plasma. So it's relatively believable that the aliens could have some sort of plasma jet weapon, perhaps, which could create an equivalent ball of plasma without needing a nuclear bomb to get it started. The aftermath would be pretty much the same as a nuclear weapon's explosion: you'd get more or less the same shockwave, the same mushroom cloud, the same intense heat near ground zero, and so on.
Of course, that's not what happened in the movie. The destructive force from the aliens' weapon spread out along the ground, not in a spherical shell as would happen from a nuclear bomb.
screenshot from the film
This may have something to do with the fact that the initial plasma jet from the aliens' weapon is a tall, thin cylinder, rather than a small sphere as a nuclear bomb would be. That would tend to push the explosive force horizontally outward at first. (This may also explain why they prefer to shoot into tall buildings... though why not go for the Washington Monument?) But once the fireball expands to larger the height of the cylinder, it won't really matter what its initial shape was; it will continue to expand in all directions equally.
This, I think, is the most difficult thing for real science to explain. Explosions don't choose directions unless forced to do so. (citation: rockets) So the aliens' technology must be doing something to alter the dynamics of the explosion. I can think of two obvious possibilities:
- They could be using the gravity-manipulation technology from the new movie to prevent the effects of the explosion from propagating upward.
- They could have changed the chemical composition of the buildings to make them explosive, prior to firing their main weapon. However, we don't see any sign of this in the movie, so it would have to be invisible and generally undetectable, and it would have to be a major change to produce the kinds of explosions we see rather than just a fire. I can't think of any way to explain this using real-world science.
1There do exist chemical reactions that release energy but don't occur spontaneously, usually because they require a small input of energy or a catalyst to get started. But you're not going to get these from building materials. They occur in combustible or explosive substances.