You can see that in the reactants, we have 1 atom of Cu and 2 atoms of oxygen, but in the products we just have 1 atom of Cu and 1 atom of oxygen, so we can balance the equation doing the trial and error method.
We can put '2' moles beside the product (CuO) to balance the oxygen, and we're going to have 2 oxygens, but Cu is not balanced, so we need to put '2' moles beside Cu in the reactants, and the balanced equation would be:
2Cu + O2 -> 2CuO.