There are 2 ways to look at "best conditions". There are the optimum conditions which take many repeated grows of the same strain and phenotype of plant to determine exactly what the given plant likes. Many of the plant strains and the phenotypes within those strains will prefer a different and specific type of growing conditions according to that plant's DNA and where it originated. This includes the maximum amount of light and intensity, maximum amount of allowed structure growth, precise levels of PH and nutrients, precise daylight and night temperatures for both the canopy and root systems, and the precise amount of CO2 and other trace elements in the air that is moved around the plants.
As you grow a given strain over and over, if you pay close attention and are willing to experiment a bit, you will learn what that plant likes and will tweak the environment until you get close to the right formula that is the "best growing conditions" for that plant. Getting to the "optimum growing conditions" takes a lot of scientific diligence, and money to achieve. Fortunately for most of us, MJ doesn't require that we get to the "optimum" level to get plenty of quality bud.
For most MJ there is a general rule of conditions. It is: (1) at least 3000 lumens per square foot of growing area for vegging, and a bare minimum of 5000 lumens (prefferably 7000-8000) per square foot for flowering. This area must be closed in so that the light is not allowed to escape into a larger area that is unlit by equal lighting. (at least 18hrs on during day-period for vegging, but 24hrs is better. And 12on/12off for flowering)
(2) There has to be ventilation set up so that the air within the grow area is removed and replaced
at least 1 time per minute so that fresh CO2 laden air can be moved in for the plants to breath, and to remove the heated, CO2 depleted air to prevent plants from getting hot. This ventilation should be set up in a way that it maintains as close to 75degree(22c) temp at the canopy during daylight, and as close to 65degree(18c) temp during dark hours. Maintaining this ballance of temps while removing heated and depleated air (also to cool lights) is the more challenging but vital part of having a good harvest.
(3) Maintaining a proper ballance of nutrients, which changes in needs during the life of the plant. This is very open to opinion as there are multiple ways of doing nutrients. The key though is to have a higher supply of macro-nutrients(NPK) and a lower supply of micro nutrients available to the plants in proper proportion while maintaining the proper level of PH throughout the grow. Typically PH is to be held within 5.5-6.0 for plants in hydro, and 6.3-6.8 for soil grows (if growing in organic setup PH is usually not an issue as microbes in the soil control that). Important is the presence of mind to not overfeed your plants as this is more detrimental than underfeeding.
(4) You must have good quality water as MJ is one of the more particular plants when it comes to what it absorbs. You need to make sure that your water doesn't have heavy metals or strong chemicals like chlorine/chloramine, and has a reasonable PH level. How much to water can be tricky until you learn your plants desires for moisture. If in hydro where water is a constant, aeration is key (actually aeration is key for any medium as the roots need to get a steady supply of oxygen). In soil this is achieved by allowing the soil to dry out a good bit between watering. For hydro, an air pump to continuously pump fresh air into the water supply is critical.
(5) one word:
Patience
I am sure there is something that I have left out so one of the others will catch it and add it in. However, it is difficult to tell you to have exacting amounts of anything for your grow as each one is a little different. Pay close attention to your plants and they will tell you what they like and don't like.