It's hard to know exactly what went wrong with your broccoli crop, but consider this:
• Did you amend the soil to the appropriate pH: 6.0-6.5?
• Did you apply potassium and nitrogen before planting and then again to seven weeks after the transplants (or seedings) got established?
• Did you keep the plants well watered and free from stress—such as diseases, weeds, and insects?
• Did you plant too early in spring? The larger that plants are when exposed to a late-season cold period, the higher is the likelihood that they will bolt.
• Did the plants experience a prolonged cold spell, followed by a favorable temps, then high temps? This sounds normal, but the variability may be the cause of bolting.
There is no easy answer. Consider these risks and try again this year. OH, then there's this—if you see broccoli thriving in a garden in your area, tell your tale and ask the gardener what his/her secret is. The best advice is sometimes right next door. Good luck! Let us know how it goes.