Unless it is a cucumber of the lemon variety, a cucumber turns yellow if it is over-ripe and past the point of edibility. The best time to harvest cucumbers is when they are medium bright to dark green in color, according to Gardening Know How.
Cucumbers are generally fast growing plants and need to be harvested often, typically every other day. A cucumber plant is usually ready for harvesting between 50 and 70 days after it's planted.
Most cucumbers are eaten while they are immature. These are generally picked when they are between 2 and 8 inches long. Thinner cucumbers have fewer and more tender seeds than fatter ones, making them more desirable. When cucumbers become overripe, the color fades and they become bitter. A yellow cucumber is not fit to eat and should be thrown into the compost pile or discarded.
Lemon cucumbers are an exception to the rule. When ready for harvesting, they are pale yellow and lemon shaped. They have a milder, sweeter taste than green cucumbers.
If all the cucumber plants in a garden are turning yellow, this is likely due to soil that lacks necessary nutrients and has a low pH balance. Cucumbers require properly fertilized soil, plenty of water and adequate sunshine.