A thermal expansion tank is a device that is hooked to a water heater to absorb excess water pressure that is caused by the heating of the water.
As you know, when something is heated, in this instance water, expansion occurs. It used to be that the expanding water simply pushed back into the cold water pipe and basically back into where it came from.
Now, with the invention of back-flow preventers and pressure reducing valves and the like, without an expansion tank the expanded water would have nowhere to go, which adds pressure to your heater and that can be very hard on your water heater.
Do you need one if you are on well water?
Generally the short answer is no, but only because most well pump systems already have one installed as a part of the pump.
Would it kill you to have one on your heater? No.
Will a plumber install one on a new water heater and charge you extra for it? Yes. They are code now and often times the price of a new water heater does not include the expansion tank.
Could you install your own? Ehhhhhhh - maybe. It's about a Three on the Hammer of Difficulty chart. You need some plumbing skills but not necessarily mad plumbing skills.
If you knew for a fact that your system did not have an expansion tank, then it would be a good idea to install one, or have one installed on your current heater.