Dogs have tongues with a large surface area. The water molecules which are present on the surface of the tongue of a dog get evaporated while panting.
And this helps to reduce their internal temperature as due to evaporation the dog's body gets cooled inside despite scorching heat.
And that's why Dogs pant during the hot summer days.