Upvote:2
This is important.
Even if you have a valid ESTA and qualify for a Visa Waiver, an immigration officer may deny you entry if he thinks you are coming to the US with the intention of staying permanently.
I believe there is nothing (in terms of immigration restrictions) preventing you from getting married while in the US, but to re-iterate again you still have to leave when your visa waiver period is finished. Be aware that some states have residency restrictions on getting married, which may affect your plans.
If you want to stay in the US with your boyfriend/husband you must apply for the appropriate visa. Questions about that belong on the Expatriates site, not here