My grasp of Scripture is poor, but the only thing I can recall in the Bible along these lines is Uzzah being struck down because he TOUCHED the Ark. How did Indy know that they should close their eyes and escape being fried by the Ark?
Cross-referenced from that initial link is 1 Samuel 6:19.
But God struck down some of the men of Beth Shemesh, putting seventy of them to death because they had looked into the ark of the LORD. ..
And he smote the men of Bethshemesh, because they had looked into the ark of the LORD, even he smote of the people fifty thousand and threescore and ten men: and the people lamented, because the LORD had smitten many of the people with a great slaughter.
Those versions are pretty much in agreement, though the number jumped from 70 to over 50 thousand.
It wasn't so much the Ark he wasn't looking at, but the everything. The Ark, the angels, and the whole thing.
I remember seeing a special on TV, a "Making of" type show, and they had a shot of Spielberg working with Harrison Ford and Karen Allen and he said something to the effect of, "And, according to the Gospel of Lucas, Indy and Marion are spared because of their goodness." I thought that was interesting because his comment, as the director, indicated that in his mind it wasn't so much whether they looked at the Ark and angels (were they ark-angels?), but that the angels actually distinguished between good people and bad people.
According to RaiderNet, this was addressed in a deleted scene. In short, Indy was given specific advice by Amir (the Imam) not to touch the Ark or look at the Ark if it's opened.
The actual scene remains lost to history, but we can get some sense of the missing dialogue from the official novelisation
Indy started to laugh. “Then Belloq’s staff is twelve inches too long! They’re digging in the wrong spot!”
Sallah laughed too. The men hugged one another as Imam watched them, unsmiling. The old man said, “I do not understand who Belloq is. I can only tell you that the warning about the Ark is a serious one. I can also tell you that it is written … those who would open the Ark and release its force will die if they look upon it. If they bring themselves face to face with it. I would heed these warnings, my friends.”
It should have been a solemn moment, but Indy was suddenly too elated at the realization of the Frenchman’s error to absorb the old man’s words. A triumph! he thought. Wonderful. He wished he could see the look on Belloq’s face when he couldn’t find the Well of the Souls. He tossed a date in the air, opening his mouth.
In the bible-it is discussed that the Ark was very special. Indy had read the bible so he knows that the Ark was not be looked upon, or touched. While the Ark was being carried across a river, the handlers started to drop it. A high priest grabbed the ark to steady it, and was immediately "struck down". There are also passages that talk about the temple being built, and that the Ark would be in the "most holy", only a few high-priests were allowed to view the sacred artifact.
In the movie, you'll notice Indy avoids contact with the Ark when possible. He knew something was going to happen at the end, though probably not sure of what was to come.