Some spells specifically state that they damage unattended objects, eg Fireball:
Unattended objects also take this damage.
The fireball sets fire to combustibles and damages objects in the area. It can melt metals with low melting points, such as lead, gold, copper, silver, and bronze. If the damage caused to an interposing barrier shatters or breaks through it, the fireball may continue beyond the barrier if the area permits; otherwise it stops at the barrier just as any other spell effect does.
Compare this with Fire Storm:
The raging flames do not harm natural vegetation, ground cover, and any plant creatures in the area that you wish to exclude from damage.
Other spells, such as Cone of Cold, make no mention of whether they affect objects, so we have to find a general rule. Though they are a little hard to find, there are rules about energy attacks to objects:
Acid and sonic attacks deal damage to most objects just as they do to creatures; roll damage and apply it normally after a successful hit. Electricity and fire attacks deal half damage to most objects; divide the damage dealt by 2 before applying the hardness. Cold attacks deal one-quarter damage to most objects; divide the damage dealt by 4 before applying the hardness.