Usually company colors are down to racing team colors. This goes for both cars and motorcycle companies and sometimes is down to the country they used to represent (British racing green for Jaguars and such, white/silver for German teams, blue for French).
For motorcycles it is a bit more complicated as different colorschemes have been associated with brands down to sponsorship. Factory Hondas are known to be red and white, but the repsol (orange) Hondas, lucky strike (white with logo) Yamahas, Chesterfield (black) Aprilias and Rizla (blue) Suzukis are just as iconic.
Branding companies work hard at this. Look at wireless phone companies here in the US, they do the same thing. It is helps to distinguish the brand when you can simplify it to a single color association.
Wait... Jaguars are green? Isn't that bad luck.
The Green Fallacy
You may have heard that it was because green was considered bad luck. Even wikipedia says "green cars were considered unlucky".
Yet I think that is taking it a bit far. Anyone that races, thinks twice about unlucky green.
Gaston Chevrolet, in his green car, crashed killing another racer and himself.
This was the first car race that killed two drivers. Also having a green car, you were flaunting the idea you would have green flag (no accident) through out the race. It just sorts of snowballed from there, of being bad luck. British racing green is accepted, on English cars. Lots of superstitions in racing, they don't have to make sense.
To quote Snopes page on the green fallacy:
The aversion to the pastoral hue is well established in the racing world. There, the sensitivity to the color's presumed darker aspects is so strong that Mario Andretti never signs autographs with green ink, and it is said Joe Weatherly (NASCAR's 1962 and 1963 champion) once removed his socks for a race because rain had changed their color from blue to green.