“The most important piece of coffee equipment is the grinder.”
Grinding coffee beans into smaller particles increases the surface area which means when it comes in contact with water more flavour will be extracted. Larger chunks have less surface area so less flavour is extracted. Another factor at work is the time the coffee is in contact with the water for. Most brewing methods have an element of filtering the grounds from the drink. Finer grounds will slow down the filtering potentially over-extracting the coffee giving a bitter drink and coarser grounds will speed up the filtering which could under-extract the coffee and create a sour tasting drink. You will need to experiment to find the best setting for your grinder.
As soon as you grind coffee beans they start to loose their freshness. The finer the grind the quicker they go stale. Vacuum sealing can slow the process down but can't prevent it so the only way to enjoy fresh tasting coffee is by grinding it just before you brew.
There are 2 main types of grinder: blade and burr. Blade grinders are like juice blenders, they chop the beans into smaller pieces. Unfortunately this doesn’t produce a consistent grind so you get powder and chunks which means over-extraction and under-extraction. Burr grinders have 2 abrasive steel or ceramic discs one of which is turned by a motor or hand crank. The beans are crushed into smaller and smaller pieces until they are small enough to pass through the gap between the discs. To change the grind size you adjust the space between the discs. Burr grinders produce a more consistent grind and heat the coffee less in the process.
Generally, you pay more for a grinder with better consistency and one that grinds more coffee at once. You can save a lot of money by buying a hand grinder which can produce great results but are much slower than electric grinders.