What is going on in the brain when you enter these jhānas? The short answer is "we don't know." But this is my best guess as to what's happening in the brain during the experience of the four jhānas. It's based on my subjective experiences, looking at the output generated on several occasions when I have meditated and been tracked using EEG or fMRI, and then subsequent conversations with neuroscientists. It is also based on the fact that there are two mesolimbic dopamine systems: the substantia nigra (wanting) system and the ventral tegmental (liking) system. Given this we can hypothesize the following:
sense desire = kāmachanda = activation of the dopamine-based wanting system
rapture = pīti = activation of the dopamine-based liking system (housed in the Nucleus Accumbens) which generates norepinephrine which gives rise to the "symptoms" of pīti
happiness = sukha = activation of the opioid-based liking system (also housed in the Nucleus Accumbens)
We can then rewrite each of the four jhāna descriptions, with the standard description given initially, followed by a neurological description, as follows (normal, italics and bold fonts are just to help you track the changes):
Quite secluded from sense desire, secluded from unskillful states one enters & remains in the first jhāna: rapture & happiness born of seclusion, accompanied by thinking & examining.
Quite secluded from the dopamine-based wanting system (substantia nigra), secluded from any other disturbing mental activity one enters & remains in the first jhāna: norepinephrine system activation & opioid-based liking system activation born of seclusion, accompanied by background mental activity.
With the stilling of thinking & examining, one enters & remains in the second jhāna: rapture & happiness born of concentration, unification of awareness free from thinking & examining internal tranquility.
With the stilling of background mental activity, one enters & remains in the second jhāna: norepinephrine system activation & opioid-based liking system activation born of concentration, unification of awareness free from background mental activity internal tranquility due to opioids flooding the nervous system.
With the fading of rapture, one remains in equanimity, mindful & clearly aware, and experiences happiness throughout one's being. One enters & remains in the third jhāna, of which the Noble Ones declare, 'Equanimous & mindful, one has a pleasurable abiding.'
With the fading of norepinephrine system activation, remaining equanimous, mindful & clearly aware with continued opioid-based liking system activation, one experiences happiness throughout one's being. One enters & remains in the third jhāna, of which the Noble Ones declare, 'Equanimous & mindful due to opioid system activation, one has a pleasurable abiding.'
With the abandoning of pleasure & pain as with the earlier disappearance of elation & distress one enters & remains in the fourth jhāna: mindfulness fully purified by equanimity, neither pleasure nor pain.
With the abandoning of liking generated by opioid system activation as with the earlier disappearance of liking generated by dopamine system activation one enters & remains in the fourth jhāna: mindfulness fully purified by the equanimity remaining from the prior opioid activation, a neutral state now that the liking systems have calmed down.
Remember it's a hypothesis it's a tentative guess! This is probably very much an oversimplification (e.g., the roles of seratonin and other neurotransmitters are not addressed at all). Much more scientific work needs to be done to see if there is any validity to this hypothesis.