If the President's party has a majority in both houses of Congress the President will most likely sign the bill and not veto it. If the opposition has a majority in one party, they may not be able to agree on a final bill and nothing goes to the President to sign. When there are two versions of a bill, it goes to conference to draw up a compromise bill. This will affect the President if Congress has members of his party in turn because they have similar ideals and Congress will use the power of the purse for the things that the president believes in as well with a majority vote. If the opposition party runs both or even one house, this may inflict what the president has in mind, different ideals of Congress and the president means that there is a standstill or a government shutdown because nothing can get done if Congress refuses to use the power of the purse.
I hope this helps :)