A very brief summary:
Amun, the Hidden One, began as a local Theban deity who left no pre-dynastic tracks, so that we today cannot say when he appeared - but we know it was at least as far back as the Old Kingdom. Earlier, in pre-Dynastic times, Egyptian deities were largely local to each city, but it became a custom when the two kingdoms were unified to raise one deity above the others and often amalgamate two or more of them to facilitate the assimilation of power and devotion. This process would recur through the centuries, packing the Egyptian pantheon until it became a mass of conflicting powers and presences.
Unsurprisingly, and beginning with the first dynasty, the institution of Kingship was seen as the sole force holding the Two-Lands together, mandating that Pharaoh must therefore be the incarnate manifestation of the active God, Horus (this notion of kingship via the falcon, Horus, was carried over from pre-Dynastic times and preserved seemingly to smooth the transition from petty kingships to unification and empire.)
Re, the sun god (Northern kingdom - Heliopolis), and Horus, a sky god (Southern kingdom), traded supremacy of devotion in the Old Kingdom and early Middle Kingdom (subsequent to the invasion and occupation of Egypt by the Hyksos and after their expulsion by the Thebans) - until Thebes, due to its powerful families of warmaking princes, emerged as the new hub of power for all of the two lands.
Now Thebes already had a chief God - Monthu, a war god...which was fitting since the Thebans had shown themselves particularly competent at battle, and for a short while he was the overarching power deity in the Middle Kingdom, diminishing Horus (who also had a war aspect in his list of attributes) to lesser but singular powers, especially pertaining to the person of the Pharaoh. But then something happened.
Ammenemhat I, initiating the 12th Dynasty, decides it politically expedient to move his center of operations North, to Memphis, the former capitol. Thebes then lost part of its political power. However, Amun was promoted to be the pre-eminent national and dynastic deity, and Thebes was designated as the city of Amun, diminishing Monthu to penultimate status, and pairing Amun with the sun God, Re (the ancient chief Deity of the North.)
Pharaoh worshiped at the temple of Amun, and was generous toward its embellishment, but he also attended Ptah of Memphis, the patron God of that city, who had been of secondary prominence in the Old Kingdom. Thus, Amun-Re, Ptah and Osiris (who were seen as holding an enduring focus of belief concerning the afterlife) formed a triad of leading deities.
Osiris, his wife Isis, their son Horus (wearing the pharaonic double-crown)
Amun, the Hidden One, ancient and arcane in Thebes, was a God of the wind, or air, or breath. All beings breathed him in. Sound traveled through him. Pollen and seeds were carried on him. The weather and the seasons were his. The stars and sky were folded into him. But he could not be seen. Amun-Re. The air and the sun. Sparkling, transcendent and immanent. His epithet became "Lord of the Thrones of the Two Lands".
His Soul (3), they say, is the one who is in the sky.
15 He is the one who is in the netherworld,
foremost of the East.
His Soul is in the sky, His body in the West.
His statue is in southern Heliopolis,
elevating His body (4).
One is Amun,
who keeps Himself concealed from them,
who hides Himself from the gods,
no one knowing His nature.
20 He is more remote than the sky,
He is deeper than the netherworld.
None of the gods knows His true form.
His image is not unfolded in the papyrus rolls.
Nothing certain is testified about Him.
25 He is too secretive
for His Majesty to be revealed,
He is too great to be enquired after,
too powerful to be known.
The Leiden Papyrus I 350
From this point forward, Amun - in numerous incarnations and paired with many another deity - emerges as the One, before and beyond all the other gods, who proceed from him but cannot see or know him. And since he was everywhere, he was considered to also be within, and could be accessed personally, by anybody, from within. Prayers to him exist seeking succor from troubles, want, poverty, affliction.
As always happens, before long the established religion of Amun became exclusive, ritualizing and prioritizing all contact and worship with the God, denying personal mediation to priestly prerogatives. The priests became worldly, powerful, and ever more hungry, until by the end of the 18th Dynasty in the New Kingdom the priests of Amun threaten to control the government along with Pharaoh himself, and thus Akhenaten breaks with Amun, establishing the Aten (the actual Sun disk and its energy) as preeminent with no transcendent character nor internal presence or access. This religion soon fell; the corrupt Amun priests and power structures returned, and then a new dynasty would emerge to glory. But eventually the power of the priests of Amun would tear the Pharaohship and the government to shreds, with waves of re-establishment of order and prosperity followed by downfall and invasion becoming the regular fate of mighty Egypt.
sources: Wikipedia, Leiden Papyrus I 350, Wilkinson 2001 p. 185, Amun the Great God by Wm. van den Duggen