Yes, if you are driving your golf cart on a public road, you are subject to the same traffic laws as a car. You can be ticketed for speeding or running a red light, arrested for driving under the influence, etc.
If you are driving the cart on private property, like a golf course or club, law enforcement will not have a reason to ticket you in most cases. However, these institutions usually have security staff. One of their jobs is to protect the club from liability by preventing accidents where people might get hurt. So if you’re driving dangerously on private property, the establishment’s security officers or management team will probably ask you to stop. Depending on the situation, they may also ask you to leave.