Culture and mores
It is easy enough to get demographic statistics and historical accounts of Galle, but it needs more than this to understand the culture of Galle — especially if you want to live there.
Galle is a fairly socially conservative city by the standards of the West, or even compared to Colombo, but not oppressively so. There is very little to compel you to follow the local mores, but doing so will make your life easier.
The starting point for understanding the local culture is that it is a coastal Sinhalese city, subject to strong colonial influences. It has a large (about a quarter of the population) Muslim minority which is the dominant influence in certain areas, especially the Fort.
Why bother?
If you follow the local mores, the locals are more likely to like and respect you. You are then far less likely to be ripped-off and far more likely to be helped when you need it, than if you are despised and disliked.
It is worth noting that the Sri Lankan custom of writing songs about scandals is still alive in Galle, and some British immigrants have already been the subject of this. many obscure people have been sung about for decades because someone came up with good lyrics about them. It is fame of a sort, but not necessarily a form you want.
Dress
In general women should avoid shorts, short skirts, or skimpy tops in public except on the beach. You do not need to go overboard about this, but do cover your thighs and do not show cleavage. If you want to wear something more revealing to a party or a restaurant then wear something on top of it such as a shawl or a wrap-around skirt.
Neither men nor women should wear shorts to places of worship: wear something that covers your knees.
Sexual mores
Conservative by Western standards. Marriage and family are central. Follow local mores or, at the very least, be discreet.
Homosexuality
Given that Galle is fairly conservative, and that Sri Lanka still has sodomy laws, it is surprisingly tolerant towards homosexuality (male at least). Do not expect gay rights legislation any time soon, but gays do not generally face major problems either.