The scene with Macbeth and the dagger is a very notable incident in the play and a very riveting one to watch on the stage. In this incident, Macbeth sees the dagger floating in the air in front of him. From a practical standpoint, Macbeth must speak to the dagger so that we will know what he sees. (The dagger is not actually shown on the stage for the audience to see.) Furthermore, in Macbeth's speech we learn that not only does he see a dagger, but it also turns bloody before his eyes. This shocking and gory detail would have been impossible for Shakespeare to present on the stage, given his lack of special effects technology. So, by having Macbeth describe what he sees before him, Shakespeare is able to include a supernatural event that he could not present any other way.
The incident works on a deeper level, too. With his words, Macbeth reveals much about his mental state as he prepares to kill King Duncan. He reaches out to touch the dagger, but finds he cannot. He wonders if it is even real, or if it is a figment of his imagination and troubled conscience. We then wonder those things, also.
The dagger foreshadows and emphasizes the violence to come, it's appearance adds suspense to the story, and it allows us to get inside Macbeth's mind. Those dramatic elements would be lost if the dagger was not included, and the only way Shakespeare could introduce it into the play was to make it invisible to the audience and revealed through Macbeth's talking to it.
back in Macbeths time there were no special effects, so there was no dagger, only in his writing could shakespeare show that dagger, he also used this to show when it was dark....as plays were only done in the daytime