Transfer and posting of an officer is the prerogative of the executive. It is an administrative order and the only executive can decide in this respect. However, in certain circumstances court can interfere but solely on the petition of the officer transferred.
Infringement of a right which is adjudicated by the court is an essential requirement for filing any suit or proceeding. A person aggrieved can file suit or seek remedy from the court.
In Sagir Ahmad vs State of Uttar Pradesh 1954 SC: the supreme court of India has held that the existence of the legal right is the foundation of the exercise of the writ jurisdiction by the court. The legal right that can be enforced must be the right of the opponent himself.
In A. Noor Khan Pathan vs State of Maharashtra 2013 (4) SCC: a stranger cannot be permitted to meddle in any proceeding unless he satisfies the court that he falls within the category of the aggrieved person.
Thus it is clear from the above discussion that a stranger, however, the general public of the city, cannot file a writ for a stay of an officer. It cannot be said that the public is the aggrieved party due to the transfer of an officer. It is presumed that every officer is honest and dedicated to the service of people.
It would be very tough for you to prove your locus standi in the writ petition, therefore it is likely to be dismissed by the court. You cannot file writ so leave this matter in the hand of the executive because it has vast power regarding transfer and posting of officers. Government is the fit authority to decide the welfare of the public and in the interest of public an officer may be transferred by the government.