The devil rejoices when we allow doubts to crowd out our faith, because his goal is to keep us from God and make us doubt His Word. The first question in the Bible came from Satan, who made Adam and Eve doubt what God had told them: "Did God really say, 'You must not eat from any tree in the garden? ... You will not surely die'" (Genesis 3:1,4).
In some instances, the devil may be directly responsible for introducing doubts into our minds -- as he did with Adam and Eve. When he does, his goal is the same as it's always been: to turn us away from God. Furthermore, whatever he tells us will be false, because lying is part of his very nature. Jesus declared that Satan "was a murderer from the beginning, not holding to the truth, for there is no truth in him. When he lies, he speaks his native language, for he is a liar and the father of lies" (John 8:44).
Not all doubts, however, come directly from the devil. Many come from within our own hearts and minds. They may be honest doubts -- that is, doubts that come because we're sincerely seeking the truth. But many aren't this way; they come because we're rebelling against God and trying to keep Him away.
We don't always know where our doubts come from -- and in a way, it's not important. The important thing is what we do with them. Do we use them as an excuse to stay away from God -- or do they cause us to turn to Jesus Christ? When we see Him as He truly is we'll be like Thomas, who once doubted but then worshipped Him (see John 20:28).