You'll need to decide whether you want to scale the data. Toward that end, you'll probably need to decide whether these images are intended only for visualization, or whether they are to be stores of data to be used for further analysis.
Images are represented by imshow() and imwrite() as relative to the black and white levels implied by the numeric class of the data. For floating-point data, these limits are [0 1]. For integer classes, the limits are the minimal and maximal values representable in the particular class.
If you have a floating point image where the entire data range is near zero (e.g. [0 1E-3]), then it is essentially all black. When this image gets quantized (e.g. to uint8) when writing to a PNG, all the detail will be lost. If there are any nonzero pixels left, the image may only be represented in a handful of discrete gray levels. Similarly, if the data lies outside [0 1], those pixels will be represented by either black or white. Subminimal and supramaximal values are simply truncated.
If the goal is simply to produce an image for visualization, you can normalize the image using mat2gray() or normalize(). Alternatively, you could apply a colormap. Either way, the pixel values are then only a relative indicator of the original data. You would need to decide how you want to handle this rescaling.
Consider the case of normalization with mat2gray(). The easy way would be to normalize to data extrema:
That would allow your image to make full use of the nominal range expected by imwrite(), but if you ever wanted to reconstruct your original data, you would need to know what those extrema were. Alternatively, you could normalize with respect to some preselected limits:
B = mat2gray(A,[lowerlim upperlim]);
Doing that might allow you to more easily reconstruct the original data from the images (so long as you keep track of these limits). It might also allow you to represent two images with a similar data range on a common scale for purposes of visual comparison.
On the other hand, if your goal is to save data for further processing, it would probably be better to just use a .mat file. If you want to do so via image formats instead, perhaps pay close consideration to the numeric class you're using and the data range with respect to what that class can represent. Imwrite() can do PNG in integer widths up to uint16. TIFF can support floating-point data with some frustration, but I doubt there's much advantage compared to using a .mat file at that point, as a floating-point TIFF doesn't exactly have advantages in terms of portability or compactness.