It's not possible to directly display data-defined symbol sizes in a legend. Here's a workaround.
Duplicate the point layer (Layer panel > right click on layer name > Duplicate layer).
Change symbology of the duplicate layer to "graduated" and for method choose "size."
- Choose any numerical field for column.
- Change the "Size from" starting value to 1mm, and the final value to the maximum number of points in a cluster.
- Change the number of classes to the maximum number of points in a cluster (same as final size value).
- Click "Classify."
- Change the legend text as desired, eg "1 point," "2 points" etc.
The style settings for the duplicate layer look like this:
Turn off the duplicate layer so you don't see it on the map.
Use the duplicate layer in the print composer legend. The legend looks like this:
You can use the controls under legend items to
- Change the way the layer name is displayed: highlight the layer name, click the pencil icon, type in the name of the original layer.
- Delete the name of the field from the legend: highlight the field name, click the red minus sign button.