So does wearing dark sunglasses affect taking photos?
Not really, it just affects what you see when you are taking photos. It doesn't affect what the camera sees at all.
How do you judge the correct exposure if everything looks darker?
Before the shot: By using the camera's light meter and a knowledge of how whatever metering mode selected will affect the metering of the scene in front of the camera. Or alternately, by setting exposure to a known value when previous experience with the same scene (i.e. a particular place at a particular time of day with the same lighting conditions) allows one to already know the proper exposure.
After the shot: By using the histogram, rather than how bright the LCD screen is (or isn't), to judge exposure.
Does it depend on whether you are using an optical viewfinder, electronic viewfinder or the LCD screen on the camera?
That depends on what "it" is.
If "it" is the camera's perception/recording of the scene the answer is "no."
If "it" is your perception of the scene the answer is "maybe." Any type of glasses will increase the distance between your eye and a viewfinder but shouldn't affect the distance between your eyes and the LCD screen. Sunglasses will also make your perception of the scene itself as well as the scene as seen in the viewfinder or on the LCD screen darker and most probably color shifted as well. But in bright sunlight most LCD screens can't be seen very well even if one is not wearing sunglasses.
What about sunglasses with polarised lenses?
Again, they won't affect what the camera sees but will affect what you see, both in regards to the actual scene and in regards to any LCD generated image. Because the light from most LCD screens is polarized in a particular direction, your polarized sunglasses may interfere with your ability to see the LCD screen properly. Military and commercial pilots had to move from wearing polarized to non-polarized sunglasses while flying when many of the displays in cockpits became based on LCD screens.
What happens if you are using a polarising filter on the camera, would the polarising effects combine in some way?
Again, for the camera, no. For you, most likely.
Or tinted coloured sunglasses, would they make the colours look strange on the camera?
For the way the camera records the scene, "no." For the way you perceive the recorded image when displayed on the camera's LCD, "most likely." The degree to which your perception will be affected depends on the exact tint of the sunglasses lenses.
This would only be a real issue if you are shooting straight to JPEG or other raster image format where the color temperature and white balance is "baked in." If you are shooting raw then the color can be completely altered later with no loss of image quality. The preview image you see on the camera's LCD would have the color baked in, but the actual raw data contains the information from the sensor before color temperature/white balance is set.