What's the minimum allowed flying height of a light aircraft over a town?
In Europe this is regulated by SERA.5005 Visual flight rules (source, emphasis mine):

(f) Except when necessary for take-off or landing, or except by permission from the competent authority, a VFR flight shall not be flown:
(1) over the congested areas of cities, towns or settlements or over an open-air assembly of persons at a height less than 300 m (1 000 ft) above the highest obstacle within a radius of 600 m from the aircraft;
(2) elsewhere than as specified in (1), at a height less than 150 m (500 ft) above the ground or water, or 150 m (500 ft) above the highest obstacle within a radius of 150 m (500 ft) from the aircraft.