You can get married and apply for an Adjustment of Status to become a Legal Permanent Resident while on a Visitors Visa so long as you did not intend to do so when you entered the US on your Visitors Visa. It all comes down to what your true intent was when you entered the US. If you intended to get married and adjust your status when you entered the US on a Visitors visa, then doing so would be an act of Visa Fraud. However, if your true intent when you entered the US was to simply visit for a period of time and return home, but while you were here you either met somebody and fell in love or the relationship that you were already involved in developed to the point where you wanted to get married, then you could get married and adjust your status while in the US on your Visitors Visa.
Even if your intent was to simply visit, never get married within the first 90 days of your arrival. Getting married within the first 90 days of your arrival on a Visitors Visa, creates a presumption that you intended to get married and adjust your status on your Visitors Visa all along. This presumption can be difficult to overcome. So always wait to get married until after you have been here for more than 90 days.
You can expect to be questioned about your intent at your interview. The hearing officer may ask questions to help the government determine what your true intent was when you entered the US. Did you have a round trip ticket when you entered the US? Did you give up your living arrangements before arriving the the US? Were you employed at the time you entered the US? If your not returning to your home after entering the US, what arrangements, if any, did you take so you can stay in the US? For example, if you were employed when you entered the US and subsequently quit your job because you decided to get married and stay in the US, did you send a resignation letter and when was your letter dated? Same for your living arrangements.