How does the structure if an atom relate to how electric charges form?
I don't quite understand the question. All electrons and protons have charges. The charges do not "form", they are already there. They are part of every atom. The attraction between electrons and protons is what holds every atom together. Quantum mechanical laws keep them a certain distance apart.
When there is an imbalance between protons and electrons, ions are formed with the charge depending on whether the ions have more electrons or protons.
http://en.wikipedia.org/wiki/Ion
http://www.chem4kids.com/files/atom_ions.html
http://www.purchon.com/chemistry/ions.htm
I hope this helps a little more. Thanks for asking.