It was generally believed "bolting" was caused by higher temperatures, but studies have shown that temperature is not the only factor. Bolting is also influenced by light exposure, water stress, and genetics.
When conditions are right, a lettuce plant will "bolt" to create rosette leaves and a flower stalk in order to reproduce. This heading growth causes the lettuce to become bitter by producing compounds like acetic acid (vinegar) and worse to provide protection against insects. That's not what you want in a lettuce plant.
You can certainly pick the lettuce before it has reached full size (before the premature bolting), but you can also avoid the factors that cause the bolting in the first place.
There's not much you can do about the total day length or the temperature (besides planting earlier in the season), but Florida farmers around here have had encouraging results from growing lettuce under screening, which seems to (1) reduce the temperature and (2) fool the internal clock mechanism that causes lettuce to determine that it is receiving a lot of sun.
Try reducing the number of light hours by planting earlier in the season (or possibly by screening to see if that works). Be sure to minimize moisture stress, particularly during the hotter months. You might try some slow-bolting varieties. You might have to try different varieties in your own garden to see how each resists bolting under your specific growing conditions; Results will vary.