How can I determine what is causing these electrical problems?
The problem with the light in the new fan/light combo is almost certainly an intermittent connection in the fan unit. 

Often these units come with two sets of wires (one for light and one for fan) that you join together at the fixture for operation from a single switch. Your first point of investigation will be to lower the fixture and check that the wire(s) attachments are done properly and securely with good quality wire nuts. 

There is also the less likely chance that the intermittent light connection could be in the light part of the fixture itself. This will require careful inspection of all the wiring up to the light socket itself. For some models of fixtures this may require some minor disassembly of the fixture.