This is actually a more complex question than you might think, because the distinction between mass and energy kind of disappears once you start talking about small particles.
So what is mass exactly? There are two common definitions:
- The quantity that determines an object's resistance to a change in motion, the $m$ in $\sum F = ma$
- The quantity that determines an object's response to a gravitational field, the $m$ in $F_g = mg$ (or equivalently, in $F_g = GMm/r^2$)
The thing is, energy actually satisfies both of these definitions. An object that has more energy - of any form - will be harder to accelerate, and will also respond more strongly to a given gravitational field. So technically, when computing the value of $m$ to plug into $\sum F = ma$ or $F_g = mg$ or any other formula that involves mass, you do need to take into account the chemical potential energy, thermal energy, gravitational binding energy, and many other forms of energy. In this sense it turns out that the "mass" we talk about in chemical and nuclear reactions is effectively just a word for the total energy of an object (well, divided by a constant factor: $m_\text{eff} = E/c^2$).
In special relativity, elementary particle physics, and quantum field theory, mass has a completely different definition. That's not relevant here, though.
If mass is just another word for energy, why do we even talk about it? Well, for one thing, people got used to using the word "mass" before anyone knew about all its subtleties ;-) But seriously: if you really look into all the different forms of energy that exist, you'll find that figuring out how much energy an object actually has can be very difficult. For instance, consider a chemical compound - $\mathrm{CO}_2$ for example. You can't just figure out the energy of a $\mathrm{CO}_2$ molecule by adding up the energies of one carbon atom and two oxygen atoms; you also have to take into account the energy required to make the chemical bond, any thermal energy stored in vibrational modes of the molecule or nuclear excitations of the atoms, and even slight adjustments to the molecular structure due to the surrounding environment.
For most applications, though, you can safely ignore all those extra energy contributions because they're extremely small compared to the energies of the atoms. For example, the energy of the chemical bonds in carbon dioxide is one ten-billionth of the total energy of the molecule. Even if adding the energies of the atoms doesn't quite get you the exact energy of the molecule, it's often close enough. When we use the term "mass", it often signifies that we're working in a domain where those small energy corrections don't matter, so adding the masses of the parts gets close enough to the mass of the whole.
Obviously, whether the "extra" energies matter or not depends on what sort of process you're dealing with, and specifically what energies are actually affected by the process. In chemical reactions, the only changes in energy that really take place are those due to breaking and forming of chemical bonds, which as I said are a miniscule contribution to the total energy of the particles involved. But on the other hand, consider a particle accelerator like the LHC, which collides protons with each other. In the process, the chromodynamic "bonds" between the quarks inside the protons are broken, and the quarks then recombine to form different particles. In a sense, this is like a chemical reaction in which the quarks play the role of the atoms, and the protons (and other particles) are the compounds, but in this case the energy involved in the bonds (by this I mean the kinetic energy of the gluons, not what is normally called the "binding energy") is fully half of the energy of the complete system (the protons) - in other words, about half of what we normally consider the "mass" of the proton actually comes from the interactions between the quarks, rather than the quarks themselves. So when the protons "react" with each other, you could definitely say that the mass (of the proton) was converted to energy, even though if you look closely, that "mass" wasn't really mass in the first place.
Nuclear reactions are kind of in the middle between the two extremes of chemical reactions and elementary particle reactions. In an atomic nucleus, the binding energy contributes anywhere from 0.1% up to about 1% of the total energy of the nucleus. This is a lot less than with the color force in the proton, but it's still enough that it needs to be counted as a contribution to the mass of the nucleus. So that's why we say that mass is converted to energy in nuclear reactions: the "mass" that is being converted is really just binding energy, but there's enough of this energy that when you look at the nucleus as a particle, you need to factor in the binding energy to get the right mass. That's not the case with chemical reactions; we can just ignore the binding energy when calculating masses, so we say that chemical reactions do not convert mass to energy.