Kepler-34(AB)b is a circumbinary planet, which means it orbits two planets instead of one. The formation of such planets are rare. The presence of them is also not common due to the fact that "powerful gravitational perturbations from the two stars on the rocky building blocks of planets lead to destructive collisions that grind down the material."
The Astrophysical Journal Letters published a research article in which they mentioned how Dr. Zoe Leinhardt and assistants from Bristol's School of Physics have made computer simulations of how planets form and the early stages of the formation around binary stars. They used complex models that calculate the effects gravity has and the physical collisions between building blocks of planets. They discovered that maybe these planets weren't formed there but must have moved there with time.
As Dr Leinhardt quoted: "Our simulations show that the circumbinary disk is a hostile environment even for large, gravitationally strong objects. Taking into account data on collisions as well as the physical growth rate of planets, we found that Kepler 34(AB)b would have struggled to grow where we find it now."
"Circumbinary planets have captured the imagination of many science-fiction writers and film-makers -- our research shows just how remarkable such planets are. Understanding more about where they form will assist future exoplanet discovery missions in the hunt for earth-like planets in binary star systems." (Stefan Lines, author of this study.)

"One Planet, Two Stars: New Research Shows How Circumbinary Planets Form."ScienceDaily. ScienceDaily, n.d. Web. 01 Feb. 2014.<http://www.sciencedaily.com
/releases/2014/01/140131130757.htm>.
/releases/2014/01/140131130757.htm>.