If you have the rename command from the Perl package (as opposed to the one from the util-linux package):
rename 's/(\d+)/sprintf"%04d",$1/ge' file.*.png
Alternative based on glenn jackman' comment, which suggests a portable solution involving Perl. As Perl has its own rename function, there is no more need for the external mv:
ls -1 file.*.png | perl -ne 'chomp;($n=$_)=~s/(\d+)/sprintf"%04d",$1/ge;rename$_,$n'
That code is easier to enhance to reproduce the extras added by the rename external command: skip if the new file name is identical with the old one and skip if there is already a file with the new name:
ls -1 | perl -ne 'chomp;($n=$_)=~s/(\d+)/sprintf"%04d",$1/ge;rename$_,$n if$_ ne$n&&!-f$n'
With some adaptation, a loop-less solution can be achieved even with Sed:
ls -1 file.*.png | sed -r '/[0-9]{4}/d;h;:p;/[0-9]{4}/!s/([0-9]{1,3})/0\1/;tp;G;s/(.+)\n(.+)/mv \2 \1/' | sh