Could any object have zero mass? Energy and mass are interrelated. As everything has energy could any object be massless? For example a photon is a packet of energy but still it is considered to be a massless particle. Why is it so?
 A: Defination of mass is :
  $$m^2=E^2-p^2$$
Where $m$,$E$ and $p$ are mass,total energy and momentum of the object respectively.
Its not necessary that if a  photon has energy it should have mass because  an object or a particle can have energy due to its momentum alone or its mass alone or due to its both mass and momentum and thus a photon has energy due to its momentum alone.(it doesnt have mass)
Putting $m=0$ in the energy momentum relation (the above equation) we find that 
$E=p$,that is a photon has energy equal to its momentum without any mass.
Here I have taken unit in which $c=1$.
A: Photons never have zero mass. As you point out, they have energy, therefore they have mass - usually referred to as "relativistic mass".
Photons are said to have zero "rest mass", ie no mass when they are at rest (stationary). But photons are never stationary, so this really has no physical meaning. That they would have no mass at rest is required by relativity or else their energy when travelling at c would be infinite. As this isn't the case, they are notionally assigned zero mass at rest.
A: There is only one mass. Lets make this clear. The concept of "relativistic mass" is not really a useful concept in my opinion. The invariant mass, or simply the mass, is defined as (in natural units, so $c = 1$):
$$E^2 - p^2 = m^2$$
The reason this is a much more useful definition for a mass, is because this quantity is Lorentz invariant, meaning it has the same value in every reference frame. If you define mass in any other way you are going to run into unnecessary trouble.
For the photon, this invariant mass is assumed to be 0, so its energy, $E$, gets a contribution only from the momentum of the photon, hence $E = p$. There are justifications for why we assume the photon has zero mass. The photon only has 2 degrees of freedom; the longitudinal polarisation does not exist precisely because the photon is massless. We also have other reasons to believe the photon is massless. Some laws  of electromagnetism would have to be modified as well if the photon isn't massless, an example of which would be Coulomb's law. Hence Coulomb's law provides a good test of the photon mass (refer to this paper) which has been assigned the upper limit of $m ≲ 10^{−14}$ eV/$c^2$.
For other particles this is not the case; since they also possess this intrinsic mass they get contributions to the energy from that quantity as well and therefore $E^2 = p^2 + m^2$.
