While the overall program for determining which neurons should be connected together is under genetic control, it is external stimuli which are crucially important in determining what network connections are made. Indeed, to some extent out brains are continually rewiring themselves to cope with passing experience. This particularly true for small children who are born with a full complement of neurons but a relatively primitive set of connections - a useful set of network connections must be learnt during the early years. It is also true that the levels of various neurotransmitters are, in part, determined by early experiences. The overall functioning of the brain is strongly influenced by such chemical balances.
Endorphins play a role in the system which produces sensations of pain and pleasure.
It is becoming increasingly clear that certain traits of personality may be determined in major part by biochemistry. It is also the origin of the amazing diversity in peoples' types and abilities. A strong connection between two neurons means that it it more likely that one of the neurons firing will stimulate the other to fire - with a weak connection it may only happen occasionally depending on the state of very many more neurons for example. Of course, this connection strength feature has much to do with the presence or absence of certain neurotransmitters since they are crucial in determining the size of electrical signal which can pass between neurons. This notion of dynamically changing connection strengths is thought to be important for memory function - new memories are stored not on individual neurons but by adjusting the strengths of connections between neurons .