Hi, the Webmap version property defines the version of the saved webmap. This version updates every four months (give or take), you should notice that it updates when ArcGIS Online has its update. The latest AGO release in June of this year writes out webmaps with the latest version of 2.28. The version property is required as it's used by other apps working with the webmap.
As for your second question on setting a version number from a custom tool which generates webmaps, as long as your tool follows the spec and adheres to this requirements, it should work as expected. So if you are currently using your tool to generate webmap json, the version number should reflect the latest release, as the spec will adhere to what is specified for this release. Hope this can help.