Partial shading is ideal. This will keep your compost from drying out to quickly. Avoid placing the bin under the edge of a roof, where rainwater may run off and over-water the pile. City Ordinance requires that your bin be placed at least one foot from any property line, and 20 feet from any habitable building other than your own home. Greens are high in nitrogen, and provide the protein microorganisms need to make the compost.
Browns are high in carbon and provide the energy source for microorganisms.
If the compost gets too wet, air will not get to the organisms. However, without enough water, the organisms will not thrive. Without enough oxygen your pile may begin to smell. When you first make your pile there will be enough oxygen. Later, you will add more oxygen to the pile by turning it.