Each country has its own laws, and I don't know which country you are planning on selling your product in, but I'm assuming it is legal to sell in your country.
RPG Maker games can be sold commercially, but be sure to give credits for all resources used and game development staff hired (or volunteered) that worked on the project.
Also, you must have a licensed version of the software in order to release your game commercially.
(If you don't have a legal version of the software, or proper credits in your game, you could risk being sued by Enterbrain or the creators of the resources used that were not credited.)
So pay close attention to what you use in the game, and how you make the game, before ever considering going commercial. =]