Could be a couple things, but it's not anything to be concerned about.
First, since your pickling I assume you're using vinegar (an acid) as a part of your solution. When garlic meets vinegar, the cell membranes of the cloves break down resulting in the release of an enzyme that reacts and produces a pigments called anthocyanins. In turn, these pigments will color the garlic in a blue or greenish blue hue.
Secondly, if you're using tap water in your solution, traces of metal in the water such as copper can react with the natural sulfur in the garlic resulting in a similar hue.
In either case, no harm is done, and all's safe to eat.