Did the disciples believe that Jesus was God or a prophet? I presume that their opinion changed when he died. They called Jesus "Lord". However, "Lord" was a somewhat common title back then.
Matthew 16:16 is perhaps the most prominent answer to this question.
So, the disciples became convinced by the miracles, the teachings, and the character of Jesus through His ministry that Jesus was the very Son of God.
Yet, it wasn't when Jesus died that their belief and understanding became solidified, but after His resurrection. The disciples were fearful prior to that. In fact, many were hiding while He was being crucified. All fled at His arrest, even though Peter made one valiant act in His defense.
If Jesus had only died, Christianity would not exist. It was the resurrection that turned "unschooled, ordinary men" into bold witnesses of Jesus who willingly faced persecution and death for their teaching that Jesus is Lord.
Yes - they thought many things, and at various stages in His ministry, differing "circles" of His disciples expressed different things.
Of His closest disciples (those we generally associate with the term "disciple", aka The Twelve), Peter declared Jesus to be the Christ first:
This is the same Peter who went on to deny Jesus three times during His trial before His crucifixion.
It took Thomas seeing the resurrected Jesus to realize who He is:
Certainly they recognized Jesus to be "important" early on (see how fast they respond to His calls of them), for example when they ask to learn how to pray:
When each of the twelve became "aware" of who Christ was is not told to us - certainly it was by Pentecost, though.
Those not close to Christ (or who were only peripherally-aware of Him), did not know who He was - but worried about Him:
In addition to the great answers here, I would like to answer the "being God" bit. When John wrote his gospel (a long time after Jesus' death and resurrection), he wrote these famous words (John 1:1):
The disciples were continually learning. They didn't have it all together and they didn't truly understand everything Jesus said or tried to teach them. They saw him calm a storm and raise the dead to life again. They even were given power to heal the sick and cast out demons, but we're limited by their lack of faith on occasion. Peter figured out Jesus was the Christ, the son of the Living God, but then he denied knowing Him. It wasn't until after the resurrection did the disciples eventually come to know who Jesus really was. Thomas got it right fairly quickly at least in word when he exclaimed "My Lord and my God".
Maybe this is what Dan Andrews was trying to ask (I could be wrong), "did the disciples believed Jesus was God ONLY after the resurrection or was it before drawing from the statement in Mathew 16:16 as Narnian was pointing out?
To answer that question we would have to know what Peter meant by "Son of God" - there are at least two possibilities:
A) Peter believed Jesus was the Messiah prophesied to save Israel who was appointed by / from God or;
B) Peter believed Jesus was the Messiah prophesied and was God himself in the flesh
the choice, I would imagine, would need to be decided by looking at the Greek and the context of this statement in the Gospel of Matthew.
The disciple John most certainly believed Jesus was God. He wrote in John 1:1 "In the beginning was the Word, and the Word was with God, and the Word was God. Then in verse 14 he told us "the Word became flesh."
Additionally he records the words of Jesus who said,
"I and the Father are one." (John 10:30.)
“the Father is in me and I am in the Father." (John 10:38.)
"Believe me that I am in the Father and the Father is in me," [ONE PERSON] (John 14:11)
If you want to tell me that the disciples did not believe Jesus, then that means they were atheists, and that is beyond the pale, even the crowds believed and so did Martha who said to Jesus “Yes, Lord, I believe that you are the Messiah, the Son of God, the one coming into the world.” John 11:27
While it is true the disciples were often confused and varied in levels of faith, enough is implied in the gospels to give evidence that they were impressed by the Holy Spirit at times to believe that He is God.
Jesus walked on water, Jesus save Peter, but the emphasis in the above passage is that the disciples worshiped Him. They would not have broken the ten commandments and worshiped Him if they did not think Him as God. In addition they called Him the Son of God, not a son of God.
Jesus spoke with authority that is not from this world. When He preached “I am the bread which came down from heaven”, many disciples who thought of Him as the Messiah (according to the testimony of John the Baptist) left, because Jesus was implying that He was much more.
This was a hard teaching, but the twelve stayed because the Holy Spirit worked in them to believe. In addition, they still stayed when Jesus said "Before Abraham I am" and "My Father and I are one", despite others wanting to stone Him for blasphemy.
Peter, James and John saw Jesus transfigured in His glory! Would they have thought He was a mere saint? If that was not enough, they then heard the voice of God testify that "This is My beloved Son" If it did not click for them, it would have clicked right there. Jesus is not merely a son of God, but the living Son of God in the fullest literal sense.