Elect one person to be the guesser, the other two pass. The guesser chooses randomly "green" or "blue". This gives them a 50% chance of winning.
The better strategy: If you see two blue or two green hats, then write down the opposite color, otherwise write down "pass".
It works like this ("-" means "pass"):
Hats: GGG, Guess: BBB, Result: Lose
Hats: GGB, Guess: --B, Result: Win
Hats: GBG, Guess: -B-, Result: Win
Hats: GBB, Guess: G--, Result: Win
Hats: BGG, Guess: B--, Result: Win
Hats: BGB, Guess: -G-, Result: Win
Hats: BBG, Guess: --G, Result: Win
Hats: BBB, Guess: GGG, Result: Lose
Result: 75% chance of winning!