There is a lot of reading to do on this to fully understand it, but without doing that reading is there a short explanation as to why and how light behaves as a wave and a particle?
The interference patterns of light show the wave nature of light.
Optical interference between two point sources for different wavelengths and source separations
The photoelectric effect shows the particle nature of light, because light hits an electron and transfers its energy to the electron.
This link gives an clear explanation and can be a start in understanding the reason light is also a particle, the photon:
Basically, it depends on the phenomena you're considering. If you're considering diffraction or reflection or interference patterns, it makes more sense to talk of light as a wave. However, since the early 1900's some physicists, among them is Einstein, who proposed that certain behaviours of light, as for example the photoelectric effect, could only be explained if light behaved like particles. Some years later Louis De Broglie proposed that the particle-wave duality is not exclusive of light, but is present in other subatomic particles, like electrons. You can have more information in here https://en.wikipedia.org/wiki/Wave%E2%80%93particle_duality and here http://hyperphysics.phy-astr.gsu.edu/hbase/mod1.html
Basically photons behave as particles or as waves (deppending on what experiment you are doing) because it's a quantum property. I have not seen further explanation. As long as I know, we have not found "why" particle-wave duality exists.