As Idiens said - it depends.
Are both batteries deep-cycles? Is the switch a "make before break" or not?
We have one starting battery (high cranking amps) and a deep-cycle house bank. We use the starting battery exclusively for starting, and the house bank exclusively for house loads. Our boat is wired in such a way that both batteries are charged regardless of switch position via diode protection.
In a previous boat we had all ccts through the switches, and were able to selectively use and charge each battery individually. Then we still had a starting battery and a house bank, but through switch selection we could choose to charge one set over the other.
The important thing here (if charging cct is also switched) is that you mustn't switch while the engine is running if the switch "breaks before make". You can test this by simply having a radio or a light on and switch from "One" to "Both" to "Two" and back. If the light/radio goes off between settings - don't switch while running. If they remain on through out, then you have a "make before break" switch. Most decent switches are "mbb", only the real cheap ones are likely to break between selections.