There are a few different possible causes for this. It could be one of the following:
Squash Vine Borer
The larvae feed on the plant causing yellowing and wilting of leaves. You may see holes near the base of the plant if borers are the cause. These are commonly seen in summer squash.
Phytophthora Blight
This can cause the entire plant to rot. You may see large brown spots on leaves. The fruit will develop soft spots which will expand over time. Fruit that is infected is often soft and may even collapse. Infected fruit may be covered with white fungal growth.
Cold Temperature
Temperatures below 50°F and wet conditions can also cause leaves to brown or yellow. Edges of the leaves will turn lighter green or brown. In extreme cases the entire plant can become wilted or discolored.