Answer:
A psychoanalyst would see the 4-year-old as having an unresolved conflict where the brain judges or evaluates how good or bad the darkness is, or the usefulness of sleeping in the dark at night based on a comparison, due to the child's exploration of the world around him. A psychoanalyst might see the child's refusal to sleep at night due to the dark as a fear created for instance when the child sleeps alone without the parent. This might change if the child sleeps at night beside the parent in the dark.
While behaviorists would look at how having previous negative experiences in the dark influences a child's behavior towards staying in the dark. This fear would be reinforced with more negative experiences in the dark such as having a bad nightmare whenever the child sleeps in the dark, a feeling of hearing, or seeing strange things while in the dark. These examples would have built a behavioral pattern where the child would be conditioned to respond fearfully to being in the dark.