How does this battery charger from an emergency rechargeable light work?
Firstly, the AC mains voltage is rated with RMS value. So in India, it is 220 Vrms. When you rectify it and smooth it with a capacitor, the DC voltage becomes 312 V because of the following calculations.

Vdc = Vpk = Vrms x sqrt(2) = 220 x sqrt(2) = 312 V

After inefficient conversion and some losses, you measured it at 270 V.

Secondly, the circuit you saw for charging the battery was a very clever application of voltage divider rule and capacitor impedance.

It is similar to the following.



The capacitor C1 is the large capacitor you saw. It's value is about 0.68 uF or somewhere near it. At the mains frequency (50 Hz in India) C1 has a reactive impedance Xc1 = 1/(2*pifC1). This Xc1 and the resistance of R1 come in series to form a voltage divider. The diode bridge simultaneously rectifies the AC wave.

The value of Xc1 and R1 is chosen such that with 220Vrms at the input, the 
voltage after the rectification is a little more than the battery voltage, to keep it charging.

C2 smooths out the ripples, but it is omitted sometimes, because the battery does not mind any ripples while charging.