In addition to the useful link mentioned in the comments by @schenectady.
I would also add the point that Bonferroni correction applies to a broader class of problems. As far as I'm aware Tukey's HSD is only applied to situations where you want to examine all possible pairwise comparisons, whereas Bonferroni correction can be applied to any set of hypothesis tests.
In particular, Bonferroni correction is useful when you have a small set of planned comparisons, and you want to control the family-wise Type I error rate.
This also permits compound comparisons.
For example, you have a 6-way ANOVA and you want to compare the average of groups 1, 2, and 3 with group 4, and you want to compare group 5 with 6.
To further illustrate, you could apply Bonferroni correction to assessing significance of correlations in a correlation matrix, or the set of main and interaction effects in an ANOVA. However, such a correction is typically not applied, presumably for the reason that the reduction in Type I error rate results in an unacceptable reduction in power.