Why are petrol and diesel not used as rocket fuel like kerosene ? Which properties make them unfit for use in rocket fuel ?
I'll try to find a source for this, but it is my understanding that in the early days of rocketry (read: 1950's, in this context), engineers tried to use jet fuel (and probably other fuels), but the way the fuel was produced led to large variations in thrust and specific impulse from test to test.
Basically, they'd fuel up the rocket engine (on a test stand), light it up and measure the thrust. Then they'd do it again, and they would get a substantially different thrust. This led to a specification called RP-1 (Rocket Propellant 1) which dictates that any fuel carrying the designation of RP-1 must have a certain level of various impurities (e.g. sulfur) and no more. This specification is tighter than specifications for jet fuel and other hydrocarbon fuels.
EDIT: The wikipedia page on RP-1  gives a more detailed description of what I said, although they attribute the problems more directly to problems with cooling the engine.
Rockets work differently to internal combustion engines. It is easier to cool an engine than it is to cool a rocket, due to the scale and usage of the exothermic reactions. rockets use specific propellants that are tested for their purity. Car engines can have fuel that have some impurities because it is ignited intermittently and is used to transform chemical energy into kinetic energy. Most Rockets ignite their fuel constantly and the resulting release of force from the chemical energy pushes the rocket away from the aperture of the rocket, even in vacuums.
Gasoline definitely has been used in rockets, along with light napthas, toluene, benzene, and other hydrocarbons that approach the specification for gasoline. As stated in other answers, the first liquid fueled rocket used it. However, Goddard's rockets were never very efficient designs.
The issue is, to a significant degree, historical: Commercial grade gasoline does not do well in rockets, and truly successful hydrocarbon rockets were first developed by militaries that wanted to run them on jet fuel. After this, RP-1 ("kerosene") and its Russian equivalent persisted as the favored fuel for hydrocarbon powered rockets, with gasoline having few advantages to justify the cost of developing a rocket and a rocket-spec version of the fuel.
You may wish to read my answer What actually is RP-1, and how is it different from any other hydrocarbon liquid fuel?, which explains a bit more about the development of RP-1. If serious rocket development had happened in the earlier time period when most military aircraft used gasoline engines, it's possible that RP-1 would be a gasoline-type fuel rather than a kerosene.
It also should be noted that gasoline is a serious fire hazard, but kerosene is much less so.