Acute glomerulonephritis is most commonly caused by the immune response to a prior upper respiratory infection with group A Streptococcus.