One of the most common reasons that the cucumbers in your garden are turning yellow is that they are overripe. Other possibilities include a virus or too much water.
Cucumbers that are overripe begin to turn yellow. If left too long on the vine, they get bigger and lose their green pigmentation. It is believed the color fades from green to yellow because the amount of chlorophyll in the vegetable is reduced as more time passes. It is best to pick cucumbers before they get too big to ensure that they have the best taste and consistency; many people find cucumbers that have turned yellow because of being overripe to be unpalatable. Additionally, if cucumbers are left to turn yellow on the vine, the plant will produce new growth less quickly, as resources are being allocated to the already-overripe vegetation. Another problem with overripe cucumbers is that the seeds become larger and harder and less desirable to eat. According to The Old Farmer's Almanac, the highest-quality cucumbers are green and firm, and regular harvesting will ensure a bigger yield.
Another possibility as to why your cucumbers are turning yellow is that they are receiving too much water. A less likely possibility is that your soil or plant has a virus that is causing discoloration of the cucumbers.