Why temperature of planets decreases as we move far from Sun? Is there a friction in the space? If yes, then does that affect speed, wavelength and amplitude of an EM wave? And i also want to know, why temperature of planets decreases as we move far from Sun?
 A: The intensity of EM radiation follows an inverse square law. Thus effective area that absorbs the radiation get small pretty fast.
Speed of EM wave in vacuum is constant, independent of choice of inertial reference frame.
Since space can be treated as vacuum with good approximation, and friction is a contact force, the 'friction in space' is negligible, noting the fact, that the object we consider (such as planet) is much more massive than any particles that might produce this friction.
A: 
Is there a friction in the space?

The  interplanitary space:

The interplanetary medium includes interplanetary dust, cosmic rays and hot plasma from the solar wind. The temperature of the interplanetary medium varies. For dust particles within the asteroid belt, typical temperatures range from 200 K (−73 °C) at 2.2 AU down to 165 K (−108 °C) at 3.2 AU.[3] The density of the interplanetary medium is very low, about 5 particles per cubic centimeter in the vicinity of the Earth;[citation needed] it decreases with increasing distance from the Sun, in inverse proportion to the square of the distance. It is variable, and may be affected by magnetic fields and events such as coronal mass ejections. It may rise to as high as 100 particles/cm3.

So some very rare matter is there.

If yes, then does that affect speed, wavelength and amplitude of an EM wave?

As seen by the numbers above the density is not enough to affect electromagnetic radiation , which is composed out of zillions of photons .

And i also want to know, why temperature of planets decreases as we move far from Sun?

The first order temperature of planets comes from the radiation of the sun. Radiation falls off as $1/r^2$ , while the angle subtended by the planets get smaller the further away they are.
The second order comes from nuclear reactions still going on at the center of planets, but it is not enough to add much to the temperature.
As Rob observes in a comment  planets that are gas giants, as Jupiter, are still undergoing gravitational contraction which:

Jupiter radiates about twice as much energy as it receives from the sun. The source of this energy is apparently a very slow gravitational contraction of the entire planet rather than the nuclear fusion that powers the sun. Jupiter would have to be almost 80 times larger to have enough mass to ignite a nuclear furnace.

So it is not that simple, more details are needed for the specific planetary system's planets.
