First calculate a bounding box for your points. If you have an array of Point features or atlas.Shape objects, use atlas.data.BoundingBox.fromData, if you have an array of positions, use atlas.data.BoundingBox.fromPositions.
From there you can either paste this into the map options when loading the map or use the maps setCamera to update the map view. In both cases you pass it into the bounds
option. Additionally, since you are working with point data, a bounding box will be based on the coordinates and will not take into consideration the pixel size of your icons. To account for that, use the padding
option to add a pixel buffer around the bounding box. For example:
map.setCamera({
bounds: atlas.data.BoundingBox.fromData(featureArray),
padding: 50
});
A lot of the samples in the sample gallery use this method: https://azuremapscodesamples.azurewebsites.net/index.html