Like Mesopotamia, Egyptian religion and politics were entwined. Ancient Egypt was ruled by a pharaoh. The pharaoh was considered a god, although not one of the main gods of the heavens. The Egyptians believed that the pharaoh was responsible for the well-being of Egypt. Therefore, they did everything to serve the pharaoh, in order that he might serve Egypt better.
Even after death, it was believed that the pharaoh continued to help govern the nation as the god Horace. In death, the pharaoh's servants weren't through - rather, they had to give the pharaoh almost everything he had needed in life in order for his ka, or eternal spirit, to stay healthy.
To ensure that the pharaoh's spirit was in a perfect resting place, the Egyptians built great pyramids and tombs. The building of these structures would take many, many workers, and so the common people had to help.
During the Middle Kingdom, the belief that even commoners could gain an afterlife was accepted widely, and so commoners prepared for their burial sites as well.
Egyptians wrote down most of everything. This included political and religious documents, as well as almost everything else. However, most of it is not relevant enough to be very well known, like Oedipus or Gilgamesh. However, one of the Egyptian's most famous writings, the Book of the Dead, is quite easy to find on most historic Egyptian websites.(To really get a good look at the Book of the Dead, go to: http://www.lysator.liu.se/~drokk/BoD/toc.html)
To look at a few good examples of religious influence in Egyptian literature, check out these excerpts from The Instruction of Ptahhotep.