Loads of amps are advertised as class A,B,AB,D and H etc. It is a common question in forums and I have adapted one of my answers for this article. I've tried not to be too technical without distorting the facts too much. I hope this helps
You need to understand the way the amp works just a little. The sound from a speaker is made as the speaker moves forward and back in time with your vibrating strings. To make it do this the amp increases the voltage to push speaker cone forward and reduces it to let it back, at some point the voltage then reverses and the speaker moves further backwards behind its starting/resting position.
The simplest way to do this is to have a single output transistor or valve doing the whole process. This is class A. The problem with this is that when the speaker is in the halfway position the voltage and current in the amp are also halfway so the amp is working pretty hard even when the speaker is in the resting position doing nothing. This means class A amps get very hot even with low signals as all that energy has to go somewhere. As a result class A amps tend to be low powered and inefficient as it is the heat that kills transistors and valves.
The next trick is to split the signal so one device does the positive side of the cycle and another does the negative side. This is class B. Now when the speaker isn't moving neither transistor (or valve) needs to do anything and there is no energy to disperse as heat. This makes class B amps more efficient and more reliable. The problem now is the point where you switch from one transistor/valve to another. The output devices aren't very linear at the bottom end of their range, there's always a bit of a gap and you end up with distortion when they change over, This is really noticeable in the quiet bits of music but is masked in the loud bits.
The solution which worked for years was to have both output devices working at the crossover point, meaning you effectively have a class A amp at this point filling in the gap and class B for the loud stuff. This is class AB. It is probably still the most common way of doing things though amp design is changing rapidly.
The next way is to control the sound by switching the output devices on and off very quickly. This is class D. By switching them on more than off you get more current and therefore more power and less by having them off more than on. Because transistors make really efficient switches this means less energy and so the manufacturer saves on expensive heatsinking and supermassive transformers. this means class D is cheaper for really powerful amps. Your PA amp or anything over 200W is likely to be class D.
Class H (or G) is using a different trick of varying the power supply voltage in the amp to make it more efficient again saving on heat problems and expensive power supplies.
The reality is that you don't really need to know any of this. You won't find a class B amp. Guitarists might choose a class A amp or even one they can switch from A to AB. but only if they are looking at a valve (tube) amp. Some people think a class A amp sounds sweeter, and it does produce most of the distortion as second harmonic distortion said to be nicer than odd numbered harmonics which do sound harsh. This will be at the cost of lower power and more heat. Typically switching from class A to AB means the amp will go from 7W to 15-20W. Having said that your sound is going to be determined by lots of other aspects of amp and speaker design so the advice is to buy the one whose sound you like and don't decide in advance you mnust have a class A amp. If you like the sound and can manage the low power/high cost then go ahead.
Bass amps won't be class A unless they are nutty 'boutique amps'. (discuss). You'll get class AB, D or H. It won't matter because you'll be playing and not designing the thing. They do have different distortion characteristics but a bassist won't be intending to distort by overloading the amp anyway. It is more important that amplifiers are well engineered rather than what class they are.
There are a couple more things to clear up and we're done. Class D isn't digital, it is switch mode. It's D because it's just the fourth class of amp (class C isn't used in audio amps). Lightweight amps are almost all class D or H/G. Even more weight is saved by using a switch mode power supply which is again sometimes mistakenly described as a digital supply. These lightweight amps are more difficult to design but are incredibly cheap to mass produce so expect them to sweep away conventional solid state amps in the next few years.
Hope this is clear, there are more details in Wikipedia if you are keen.