The granulation of honey is called crystallization. All kinds of honey crystallize/solidify/freeze over time. Quite often when honey crystallizes it's assumed by many that it's adulterated or not pure. Ironically, just the opposite holds the truth that crystallization is a natural phenomenon in raw honey. Depending on plant origin, honey may either crystallize faster or remain liquid for a long time. Honey from flowers of Ajwain, Tulsi, Sidr, Fennel, etc. Crystallizes quite slowly and can stay liquid for several years without any special treatment whereas honey from Mustard, Coriander, Dill seed etc. flowers crystallizes quickly within a month from harvesting. "How fast", "how much" and "why honey crystallizes" involves number of factors.
The main reason is how much glucose versus fructose was in the nectar that bee used in making honey. Honey contains a variety of natural sugars including glucose, fructose, sucrose and maltose. Glucose and fructose are the reason that the honey tastes sweet, but it is glucose that influences crystallization. Overtime the glucose molecule crystallizes. Once this happens, the first crystal acts as a seed, creating more crystals and filling the whole container.
Raw honey crystallizes faster than processed honey. Raw honey also has 300 substances like amino acids, minerals, proteins, etc. They all affect the crystallization process. Tiny molecules of pollen, propolis and wax can also serve as a building point for crystals to start off.
Seasons also play a significant role. The process of crystallization begins as soon as they leave 35° Celsius, which is the average temperature of the hive. In cold days honey crystallizes faster while in summer this process slows down.
The honey is still perfectly fine to eat to revert it back to its liquid form, all that's required is the immersion of honey jar in warm water for a few minutes.