All citrus fruits are green while they are still growing on the tree. Lemons lose their green colour as they ripen because the chlorophyll pigment is replaced with a chemical called anthocyanin.
Many lime species would also turn yellow if you left them on the tree long enough, but they never get a chance. This is because ripe citrus fruits are too soft to travel well, so farmers always pick the fruits while they are green and under-ripe.
Oranges and lemons will continue to ripen on their way to the supermarket, but a quirk of biology means that limes stop ripening once they are picked.