Without knowing what else is on the circuit and what kind of a draw it puts on, I would not recommend it.
Open up the ceiling box and disconnect the blue wire coming from the light and connect it to the black wire coming from the fan. Be sure and put a wire nut on the wire where the light was connected before you removed it. The wall switch is controlling power to the wire where the fan is connected so when you connect the blue fan wire to that connection you will be sending power to both the fan and light from the wall switch.
Normally red or black is the hot wire and green is the ground. However someone may have used the green wire as the neutral wire which is normally white. Just connect the black wire from the light to the red wire and the white wire from the light to the green wire and see if it works. If not you have to pull the wires out of the ceiling box and see how they wired it.
To the black wire on the fixture.
It will have 2 black or brown wires. Look very closely at the wires coming from the light. One of the wires will have ridges on it or may have a white line or some other method of identification. That wire is the neutral wire and connects to the white wire in the ceiling box. The smooth wire is the hot wire and connects to the black wire in the ceiling box.
You switched the power and switch wires. There should be two sets of wires in the ceiling box. 2 black, 2 white, 2 bare. Two groups of three. The white wire going to the light is the incoming wire. The black one in that group is the power coming in. Take that black wire and connect it to the other black wire. The second black wire goes to the switch. The power comes back to the light on the white wire of that set. Connect that white wire to the black wire in the fixture. The switch should work now. That is if everyone wired the house the way it is supposed to be.
Check the wire. It must have been broken in between
Open up the ceiling box and disconnect the blue wire coming from the light and connect it to the black wire coming from the fan. Be sure and put a wire nut on the wire where the light was connected before you removed it. The wall switch is controlling power to the wire where the fan is connected so when you connect the blue fan wire to that connection you will be sending power to both the fan and light from the wall switch.
Wire nuts
Normally red or black is the hot wire and green is the ground. However someone may have used the green wire as the neutral wire which is normally white. Just connect the black wire from the light to the red wire and the white wire from the light to the green wire and see if it works. If not you have to pull the wires out of the ceiling box and see how they wired it.
Just install a cover on the ceiling box.
To the black wire on the fixture.
It will have 2 black or brown wires. Look very closely at the wires coming from the light. One of the wires will have ridges on it or may have a white line or some other method of identification. That wire is the neutral wire and connects to the white wire in the ceiling box. The smooth wire is the hot wire and connects to the black wire in the ceiling box.
You switched the power and switch wires. There should be two sets of wires in the ceiling box. 2 black, 2 white, 2 bare. Two groups of three. The white wire going to the light is the incoming wire. The black one in that group is the power coming in. Take that black wire and connect it to the other black wire. The second black wire goes to the switch. The power comes back to the light on the white wire of that set. Connect that white wire to the black wire in the fixture. The switch should work now. That is if everyone wired the house the way it is supposed to be.
Is this a fluorescent fixture? Most fluorescents will not start if the fixture is not grounded. Make sure the fixture has the branch circuit ground wire properly connected.
Some ceiling fans have a black, white and sometimes blue wire. The blue wire in this case is so you can switch a light separate from fan. If your fan doesn't have a light just put a wirenut on extra wire and ignore it. If you do have a light and want it switched you'll need an extra wire run to fan, and switch that wire for light.
You will want to leave about 8" of wire sticking out of the box. After connecting the light just push the extra back into the ceiling box.
Just remove the old light and install the new pull chain light connecting the black wire to the copper screw and the white wire to the silver screw. There is no connection for the ground wire. Just shove it back into the ceiling box.