I read Why are planes generally painted white?, and got interested in knowing, why don't military aircraft follow this? Rather than the advantageous white, most of the military aircraft are rather painted pretty darker, green or black or some other color. Why is this done? Probably, it is not for distinguishing military with civilian aircraft .Becuase, the RADAR knows which aircraft is what.
This wiki article speaks to this somewhat. In modern-day air forces, the paint job will depend on the mission the aircraft is used for. However, with the improvement of radar, visual camouflage is less important than it used to be.
Some aircraft are paint black or nearly black for use in night missions. The F-117 (shown above) was painted with a radar-absorbent paint and also primarily flew at night, lessening its probability of detection. Other aircraft, like the special operations MC-130 and AC-130 are painted very dark grays or blacks to lessen their probability of detection since they are primarily used at night in support of covert missions, often at low level where visual detection is the main threat. Modern Examples: B-2, MC-130
Some aircraft are painted to blend in to the ground. Some of these are those designed for low-level attack roles (like the Tornado pictured above), to limit the chance of visual detection by enemy fighters from above since their radar signature is unlikely to be detected so low to the ground. Others, like the now-retired Saab 37 Viggen, may be camouflaged to prevent detection when parked on the ground, as many were dispersed around Sweden, sometimes hidden in forests, to prevent single attacks from taking out many defenses. Many military helicopters are also painted either a patterned or dark green color to blend into forests. Some aircraft have been painted tan to blend into desert environments. Modern Examples: Su-25, Super Tucano
Many air superiority fighters, and a large group of combat aircraft in general are painted in some way to blend into the sky. I have read that the human eye has difficulty picking a gray plane out against the blue sky (or grayish clouds), and most USAF and NATO planes are painted in some form of "Air Superiority Gray". Additionally, many will have different-colored tops and bottoms to help blend in from above and below. This excellent aviation.se Q&A talks about false cockpits on military jets that contribute to better dogfighting performance. Some aircraft, like the Su-27, may have several different grays and whites painted on it to break the aircraft's shape up. Modern examples: F-22, MIG-29
There may be other aircraft that have unique paint jobs to assist in a specialized mission - a darker color on one area to help with sensors, special coatings to minimize damage from a nuclear flash. Overall, it is not as common as it used to be for aircraft to be green - most US Military aircraft were green in color during the Vietnam War, but as the distance of aerial combat has increased, so have the camouflage schemes. Grays are probably the most common paint jobs now among military aircraft of many countries, with other aircraft having specialized paint jobs for specialized roles.
Military aircraft often are painted for camouflage effects. Aircraft that fly night missions may be entirely black. The top portions may be painted to make them more difficult to identify from the air while parked on the ground.
Different forces and missions have radically different priorities for the appearance of the craft. Even though you can't make them invisible, simply increasing the time it takes to get a good visual identification can be an advantage for a military craft.