From a purely MTF (Modulation Transfer Function) point of view the operations you describe are identical. Adding the same pixels in the analog domain or the digital domain will give you the same spatial results with it's blurring, Moire fringes and other artifacts.
In terms of noise it very much depends upon how well you are digitizing the signal.
A CCD bins by summing charge, the noise will increase by \$\sqrt{N}\$ and the signal will increase by \${N}\$. The ADC noise floor will be the same so this signal will be readily digitized, at the risk of running out of head room on the ADC (the bright parts of the scene will clip). Assuming the ADC was setup to digitize the right level of noise it will only get better. Binning in the analog domain can potential increase your frame rate.
Summing after digitization is more convenient since it is simply a memory access to get the same colors gathered together. There is less supporting circuitry and certainly less analog circuitry with analog storage elements. the mathematics for the SNR is very similar in this case, the main difference here is that if your digitization level does not include enough of the noise floor then when you do the summing in the digital domain the noise patterns may be very unpleasant. Because you are sampling at the what the ADC resolution is, this thresholding can increase the noise in the digital domain. However, if the the noise level is sufficiently higher than the ADC noise then it will look the same as the analog domain.
All things being equal, the digital domain is easiest and less expensive.