They puff up as part of their threat display to make themselves appear larger.
They also do this when there's no apparent threat, perhaps as practice or stretching. Mine's been doing it a lot lately as part of his annual spring fever. My dragon doesn't go into a deep brumation like many dragons, but he does generally become less active in the winter. This breaks around mid-March with a burst of activity including lots of beard flexing, puffing up, head bobbing, and constantly wanting to run around like a maniac outside of his tank.