Ancient Egypt is just a popular place in general, and the rise of Egyptology from the 19th century onwards the discoveries this has made (particularly in the Valley of the Kings) has just solidifed this pop cultural iconography. This has something to do with the striking architectural style and statues, many of which are surprisingly well intact, and also with, well, mummification, as intricate, strange and iconic a method of dealing with death as that is. It's understandable that it's become ripe fodder for undead stories up there with zombies and vampires, really.
The role of Egypt in sci-fi tends to be influenced by Van Daaniken's Chariots of the Gods, and similar nonsense theories about the pyramids being built by aliens, or maybe the Egyptians holding some hidden truths or whatever. Stargate basically builds its premise on, and the old BSG had strong elements of it as well. The Fifth Element goes the tack that the Egyptians had hidden knowledge, and everyone loves this vaguely gnostic idea (the Nag Hammadi Codex has certainly helped this notion, I'd expect).
Fantasy is a tad more varied in how it appropriates Egypt and Egyptian imagery. Sometimes it just appropriates the stuff for a made-up culture or race, and while that'd be an easy role for sci-fi shows too it's less oftenly seen then I'd expect.