I've been researching all night, and it looks like Malta is a fairly easy country to get married in for people who don't live there.
I think Gibraltar is as well, as it's a British Overseas Territory (I'm going to be moving there for work for 4 months next year).
I still want to clarify though, if I come in to the UK under the standard visitor visa time frame, will I be allowed to go to Malta for a few days, get married, and then return to the UK to finish out the rest of my time there on the visitor visa? I just want to be sure I won't get in trouble! The last thing I ever want is to break the rules and be kicked out.
Well, the thing is that if you have a standard visitor stamp (issued at the border), it is only valid for one entry to the UK. So, as soon as you leave the country, your visitor visa will be cancelled and you'll have to get another 6-month visitor visa when you come back into the country, which means you'll need to have all your evidence of being just a visitor with you (return ticket to the US, evidence of your job, home, studies etc. in the US, bank statements to show you have enough money, etc.), to show you meet the requirements for a visitor visa.
So, it's not that it's not legal/allowed, it's just that you will have to get permission to come back in again on a new visitor visa... so, as with any entry to the UK, there is always the risk is that you might not be allowed back in again - and the more often you leave and come back, the more chance there is of being refused entry (as it may look like you are trying to spend too much time in the UK).
One option though would be to apply for a visitor visa in advance of coming to the UK (£87), because it will be multiple-entry, so it won't be cancelled when you leave for Malta (or wherever you marry).
And if it is all legal and allowed, is it necessary to tell the border agents when leaving/coming back to the UK from Malta that we were married on the trip?
You don't have to offer the information out of the blue, but if they ask you about your trip, you should answer their questions honestly.
Also, having knowledge of the visa rules will help, as it shows you understand the correct process for moving to the UK - i.e. knowing you must return to the US to apply for a spousal visa and that you can't stay in the UK for more than 6 months.