Suppose if a windmill is made torotate in clockwise direction and due to air flow if it rotates in anti clockwise direction then does it produce electricity?
Wind turbines use induction generators, and most commonly, the jargon of doubly-fed induction generators applies. Now, the terminology I've seen most often in textbooks identifies motors and generators to be the same thing, just operating in different "directions", and both are called machines. The next major item to cover is the fact that a wind turbine produces power for a 3-phase alternating current electrical grid. This is important and I will return to it.
Mechanically, the blades harness the power of the wind through their airfoil shape and orientation. The common designs, if my understanding is correct, actually rotate in order to face the wind at all times. Now, the question can still remain of what would happen if this system was not functioning, someone let it face the opposite direction (face opposite the wind direction) and the gearbox and electrical systems were still connected. In this configuration, the wind would be pushing it to rotate in the opposite direction of what it normally does because the orientation of the blades would be opposite (they actually have control of the orientation of the blades, but turning 180 degrees may or may not be within the engineered range of motion).
Note that we are going from positive rotation, positive torque (torque from the wind) to negative rotation, negative torque. It is a generator as long as the direction of rotation and torque are the same, and it is a motor if the directions are opposite.
In this case, we are still talking about the wind imparting energy to the turbine but in the opposite direction (rotation) than usual. This could work except for one problem, which has to do with the 3-phase power. Academically, as well as practically, the phases may be labeled A, B, and C. One phase "leads" another phase by 120 degree electrical angle. Think of a sinusoid and you won't miss any accuracy in the model. This means that any given phase will have a phase in front of it and a phase behind it. The normal ordering of the phases is ABC, logically. Electrical devices that deliver current in all phases at equal magnitude in that order are said to be delivering positive sequence current. An alternative exists, in fact two do. You may want to read up more here:
A negative sequence current is where all phases get current in equal amounts and the order is reverse, that is, CBA. Zero sequence is yet another concept where current is delivered through all sequences with no electrical angle between them. If the generator was working in this backwards direction and it was a synchronous machine (it's not btw) then it would be delivering negative sequence current. This is not desirable for the operation of the electric grid.
A problem with this description is that the machine is really an induction generator, and not only would the delivered currents be wrong, but the electronics for energizing the rotor itself would be messed up. I don't know what would happen in this case, but I hope I've at least impressed the importance of the "handedness" in the electrical systems of generators.
In short, it would still produce electricity, but it would be the wrong kind of electricity.
In theory, and taking a very simplistic view, yes: it moves a conductor through a magnetic field, and this would induce an electric current, regardless of whether the rotation is clockwise or anticlockwise.
However, in practice, the electronics, mechanics and blade design of a wind turbine stop all this from happening, and neither the mechanics nor the electronics are designed to cope with it.