I have Schengen tourist visa, I want to marry my girlfriend but she lives in London. If she comes to Germany or the Netherlands can we get married? I have just a one month Schengen tourist visa.
German authorities don't care on which visa you are in Germany, as long as it's legal. They did not even ask.
However, German authorities require a lot (and by a lot I mean a lot) of paperwork you will not get in a month. You both need to be physically present to swear that all your data is correct, then you get an appointment to marry and then you marry. You need all the paperwork to be in order to even get to the swearing/appointment getting part. Oh, did I mention that all your paperwork has to be translated to German by a certified German translator? And it needs apostilles from your respective home countries. Oh, they need to be translated as well. By a certified translator. English may be an official EU language, but that does not keep German authorities from refusing to accept it. Oh, and all of it has to be recent, nothing older than 6 months.
I went through all this with one party being German national and one party being a non-EU foreigner. It took us half a year to get the paperwork and translations.
The costs of the translations alone would have been enough for a two-person trip to Vegas including getting married by Elvis. And they don't want to see any of the paperwork either except for your ID.
I cannot speak for the Netherlands, but don't try Germany. It was bad enough with one party German, you will not make any better progress when none of you is German. Navigating the German authorities is hard even when you have lifelong experience. If you just want to marry somewhere, make sure that somewhere is not Germany.
There is one big problem with your plan: In Germany, you can only get married at the registry office of a place where one of the two prospective partners is a resident.
Since one of you is living in London, and the other is living somewhere outside the EU, you cannot get married in Germany. Your girlfriend, as a British citizen, could move to Germany and become a resident there, and then you could get married in Germany. It doesn't matter that none is a German citizen, but one must be a resident in Germany.
Everything that nvoigt says still applies. Basically, the marriage must be legal according to German law, in this case legal according to British law, and legal according to the laws of your nationality. Legal according to German and British law is no particular problem; your country may or may not have interesting laws that you won't be able to get around. And everything well documented with German translations.
When nvoigt says "bad enough with one being German citizen", well, with two non-German citizens it just means twice as much paperwork. There are no particular problems because none is German, it's just two sets of paperwork instead of one.