Chard, lettuce and all vegetables eventually produce flower stems and go to seed. This is natural but if they do so prematurey it is called bolting.
This is caused by uneven growing conditions, drought, cold weather, hot weather and disruption of the roots by transplanting.