electrostatics

we take the potentisl of the earth to be equal to zero for solving some problems though the potential of earth is not equal to zero . why is that ? or when can we do that ?
 Mentor Potential is relative to an arbitrary datum. You just define the zero potential surface wherever it is convenient for the calculations. So differences in potential are real, but an absolute potential does not exist. Think of it in terms of voltages -- you can define any place as zero volts, and then use your DVM to measure the voltage of other things with respect to that spot. Wherever you put the "-" lead of your DVM is automatically defined as the zero potential spot for that particular measurement.
 we have 2 concentric spheres of radius a and b carrying charge q each . now the inner sphere is earthed . to calculate the final charge in each surface i kept the potential of the inner shell = 0 and used gauss law . am i doing a wrong thing by putting the p[otential of the inner shell = 0 ? if i m justified in doing that then that potential is zero wrt what ?

Mentor

electrostatics

Zero with respect to zero. It is your reference or datum. Often, we refer to "Earth" as zero volts, but only because we use it as our voltage reference so often. The "Earth" is not at the same potential as the Sun, so we could use the voltage at the surface of the sun as our zero reference, but that wouldn't be very convenient, eh? :-)