You cannot marry in the UK on a standard visitor visa. This is a limitation of the visa, not of UK marriage procedures.
The only exception is if you already have a civil partnership - and you can't form a new civil partnership on an SVV either.
In terms of actually getting married, there are five different sets of rules in England and Wales that determine how you get married, and Scotland and Northern Ireland are different again.
The five rules are:
Registrar: These are the only rules for a non-religious ("civil") marriage; they require the marriage to have four week's notice, which is made public. Weddings have to be either at the registry office (which will be very basic) or at a licensed venue (which you would, obviously, have to pay for). Venue licensing is very complicated and you need to check that the venue is already licensed, because (unless you're very rich) it will be much too expensive to license a venue just for your wedding. One important rule is that only indoor venues can be licensed; outdoor weddings cannot be conducted under a registrar. Same-sex weddings are allowed with registrars.
Jewish marriages: The Board of Deputies of British Jews approves Jewish marriages, and they license rabbis to perform marriages. If you are both Jewish, then Jewish marriages are very flexible, without notice requirements or need for the venue to be licensed - Jewish weddings are just about the only outdoor weddings in England. It's up to the rabbi whether to allow same-sex weddings or not.
Quaker marriages: The Society of Friends approves Quaker marriages, and is not subject to external regulation. However, they are unlikely to approve a marriage that isn't held as part of a regular Meeting for Worship in a Friends' Meeting House, so you pretty much have to be a member of a regular Meeting to have one. While Quakers are allowed to conduct outdoor weddings, they don't. Quakers allow same-sex weddings.
Other religions (other than Jews, Quakers and Church of England): A place of worship must be licensed to conduct weddings. You have to give notice at the register office 28 days before the wedding, just as for a wedding with the registrar, but the religious celebrant will conduct and register the wedding. The licence for the place of worship will determine whether same-sex weddings are permitted (they mostly aren't).
Church of England: Notice is done either through Banns or a Licence. Banns have to be read at the Sunday service each of the three Sundays before the wedding - but they must be read at the church where the wedding will be and at the home churches of both participants. Otherwise you need a Licence - a Common Licence if you live outside England and Wales but are EEA (inc British, EU) or Swiss citizens. Alternatively, you can give notice at a registry office in the usual way for a civil wedding, which grants you a Superintendent Registrar's Certificiate - this is the only way to marry in the Church of England if either or both people are nationals of countries outside the EEA (or Switzerland). Church of England weddings cannot be same-sex.
The registrar will always check your immigration status before allowing you to give notice. The only ways around this are Banns (but you're not resident in the UK, so that won't work), to get a Special Licence from the Archbishop of Canterbury for a Church of England wedding (very unlikely, let's be honest), or to be Jewish or Quaker. While the marriage in those cases would be legal, it would also be a breach of your visa and you'd be likely to get deported.
In both Scotland and Northern Ireland, all weddings go through providing notice to a registrar 28 days in advance, which means that the registrar checks immigration status at that point. The actual conduct of weddings in those countries is much more flexible than in England and Wales (notably: you can marry outdoors in Scotland), but the law is much more standardised.
If you want to marry, you need either a Marriage Visitor Visa (if you intend to live outside the UK after the marriage) or a Family Visa (if you intend to live in the UK after the marriage). I expect you will find it difficult to get a Marriage Visitor Visa if your intended spouse is permanently resident in the UK as the immigration officer is very unlikely to believe that you don't intend to live with your spouse after marriage.