The only real way to tell if a cucumber is bitter is to slice the cucumber and taste it.
Cucumbers most often become bitter when grown too long or because of heat stress but the bitter cucumbers are safe to eat.
You can still eat a bitter cucumber as there's nothing harmful about a bitter cucumber.
Bitter cucumbers are safe to eat.
The actual cause of bitterness in cucumbers and other gourds, like zucchini, is due to a compound known as cucurbitacin.
This compound is always present in cucumbers, but the levels change based on the growing process of the vegetables.
The higher the level of cucurbitacin, the more bitter the cucumber.
Nothing is harmful about eating bitter cucumbers although you may not enjoy them.
Cucumbers that have become bitter are still safe to eat although it might not be as tasty as non bitter cucumbers.
You can sometimes get rid of the bitterness in the cucumbers by thinly slicing off both ends of the cucumbers and rubbing once piece against the bitter cucumber.
I do this sometimes when I have bitter cucumbers and it does get rid of the bitterness in cucumbers.
You can safely eat the cucumbers though even when bitter but I recommend doing the above to get rid of the bitterness for a better tasting cucumber.