One common cause is if the kernels are old, which can happen when you over-sow or plant late season corn. It's also possible for them to turn gray if you have been harvesting your corn too soon and there is still green stalk left on the ears. You may also see them turning brown due to a waterlogged soil condition, if it has been raining heavily in your area. Finally, they may end up looking gray/brown due to an iron deficiency.
If your sweetcorn is not turning yellow, it might also be because you have been buying organic sweetcorn. The reason for this is that organic sweetcorn does not contain beta carotene so it does not turn yellow.