Modules are referred to first by their Class (the number) and then by their Grade (the letter). Class is most important, which is why it's first. It's 3A or 3B rather than A3 or B3.
The number is the Class. Better ships will have more higher-Class hardpoints for better equipment.
The letter is the Grade within the Class. D-Grade modules are lighter but weaker, and B-Grade modules are tougher but heavier.
In general, higher Class is better (assuming it will fit in your ship) but sometimes a higher-grade but lower-Class module is better.
For instance, a 5B module might be better than a 6E in some cases.
An important consideration is weight, as you have to make sure your ship isn't overweight.