Yes, you can actually solve this with Geometry Nodes (at least in version 3.2).
The Basic Idea
For this you would just have to use
Store Named Attribute to store a boolean value into the geometry (in the point domain).
But you have to create a vertex group in the underlying geometry first, because only then you can select the vertex group in the bevel modifier.
The gray cube is the existing geometry, and the green cube was created with GN
However, the whole thing only works if at least a single vertex of the original geometry also ends up in the Group Output!
If this step is not observed, some stupid bug probably comes into play once again, which apparently prevents the geometry created in Geometry Nodes from being processed correctly by the subsequent modifier as well.
Also, the node
Join Geometry must first be fed with the original mesh, and then with the geometry created in GN. The order is also crucial here!
Bug reported: https://developer.blender.org/T100042
If you take the above approach, then you can solve this as follows:
Here I first instantiate cubes and scale their height with some random values.
To be able to select the edges, however, I have to subdivide the mesh with
Subdivide Mesh, because otherwise I can't exclude the lower edges in the selection.
With a little boolean logic I can filter out the edges that should be rounded.
To avoid the bug described above, I built all this on a canvas, which I put into the node
Join Geometry before the generated geometry.
However, there is a simpler solution, as I have just discovered:
This works very well if you can live with the fact that the cubes have no faces on the bottom.
Here I simply extrude a square.
Since you also want to have the side edges rounded, all edges are simply put into the vertex group and then rounded with the Bevel modifier.
The remarkable thing about this solution is: It is simple!
The strange thing about this solution is: Here the bug described above does NOT come into play! ...please don't ask me why, that's Blender.
PS: By the way, you don't even need a "Vertex Group" here (see comments), because with this solution you simply switch to Angle for the bevel modifier and the edges are then rounded based on their angles (thanks to @RobinBetts!). But I'll leave the answer here anyway, because it also serves to illustrate the "bug" that is currently being discussed at https://developer.blender.org/.