If there are too many files expanded via the *.png wildcard, then the argument list length maximum can be exceeded. The last time I checked, Mac OS X had a 256K line length limitation. (AIX was 1M, Linux 128K, Solaris 1M, Windows 8K (Cygwin env) - your mileage may vary with each operating system release).
If you have too many files to expand on the command line, then you can delete them in batches. There are several ways to do this
cd ~/Desktop
rm [a-m]*.png
rm [n-z]*.png
rm [A-M]*.png
rm [N-Z]*.png
Or finer increments.
You could use something like
find ~/Desktop '*.png' -print0 -depth 1 | xargs -0 rm
And you can also use
find ~/Desktop '*.png' -depth 1 -delete
This being a Unix environment, there are most likely a dozen additional ways to delete all the .png files and avoid command line length limits.
As MrHoffman says, using rm and wildcards is a very dangerous thing to do unless you really REALLY know what you are doing. If not, I strongly suggest having a recent full backup handy. I actually suggest a backup regardless of how good you are in the Unix environment (I have multiple via different backup utilities preformed on a very regular basis; years of experience has taught me you cannot be too careful with your data - it is worth far more than the cost of backup equipment).