Air is caused by air flowing from high pressure to low pressure. And the heat from the sun is a major contributor of air pressure changes. Now imagine you are boiling some water on the stove. It is the heat of the stove causing the water to boil. But if you torn the stove off, will the water instantly become room temperature? Or will the heat from the stove transferred into the pot and the air still keep the water warm? Just because it's night doesnt mean the sun stops working. Besides its always day and always night. Isn't it?
Sun doesnt causes the wind, heat does. And heat is caused by the sun. Because of the heat difference, there are winds. So it is normal to be windy in night. Heat goes down because there isnt a Sun around.
I would assume it is because IF it is indeed true that the sun "causes" the wind, then the sun is shining on the other side of the planet, that wind will affect the wind where you are in a complex cause and effect scenario.