Thanks to all of you for the quick replies and suggestions.
Initially I had tested the mains socket using a multimeter. The voltage between left and right (neutral and phase) was normal. (~ 220V) Between earth and phase, it was near to the mains voltage. (~ 217-218V) and between earth and neutral it was about 2-3V. Hence I assumed everything was alright with the mains. Yesterday called a local electrician and he checked it using a bulb between earth and phase and seeing it lit he said that earthing is alright and I may get the PC checked and if necessary, he will install separate earthing for the particular room but being in a rented house, I postponed the option. (I know these tests are not perfect but we do not have access to things like impedance testers!)
All the while, the the connection was from mains to a Belkin Spike guard and from it to an APC 650VA which supplied to the PC, monitor and modem while the laser printer was fed by the spike guard itself. Today made the connections to PC and monitor through the UPS, avoiding the spike guard and the problem disappeared. Then connected the spike guard to the mains and measured the voltages and it is seen that the phase and neutral are reversed, the right side terminal being neutral and left one phase. So my provisional diagnosis is that the Belkin spike guard was the culprit.