No you don't need underlying stock for writing an option ,
suppose u wont to write a write a nifty call option Strike Price 5500
Then you will req 5500* 50* 10 or 12 % = 27000-30000 approx depending
and at the same time you will receive premium i.e 50 * Price of Call option .
i mean there will be inflow of cash