I think it would be good to read James 1:17 in relation to your question.  That says, “Every good gift and every perfect gift is from above, and cometh down from the Father of lights, with whom is no variableness, neither shadow of turning.”  Everything we receive from the hand of God is good.  However, sometimes the things the Lord gives us do not seem so good.

Hebrews 12:6-7 says, “For whom the Lord loveth he chasteneth, and scourgeth every son whom he receiveth. If ye endure chastening, God dealeth with you as with sons; for what son is he whom the father chasteneth not?”  It is a sign of God’s love to us when He chastens us.  The word ‘chasten’ comes from the Greek word ‘paideuo’, which literally means to discipline, to train up a child, educate, instruct.  When it is necessary, the Lord will chasten us so that we might learn from our mistakes and learn to depend upon and follow Him.  This chastening may not be a pleasant experience, but in the end “it yieldeth the peaceable fruit of righteousness unto them which are exercised thereby.” (Hebrews 12:11)

Often the Lord will bring us through trials to strengthen our faith or to teach us patience.  We read in James 1:2-3, “My brethren, count it all joy when ye fall into divers temptations; Knowing this, that the trying of your faith worketh patience.”  We should rejoice when the Lord brings trials upon us.  The result is precious and needful.  However, any temptation to sin is not from the Lord.  James 1:13-14 tells us, “Let no man say when he is tempted, I am tempted of God: for God cannot be tempted with evil, neither tempteth he any man: But every man is tempted, when he is drawn away of his own lust, and enticed.”  The Lord ‘tempts’ us by trials, not by sin.  He will never put the opportunity to sin in front of us.  He cannot be tempted to sin, and He will not tempt us to sin.

The Lord may allow something to happen to us that will help us to avoid sinning.  The Apostle Paul says in 2 Corinthians 12:7-9, “And lest I should be exalted above measure through the abundance of the revelations, there was given to me a thorn in the flesh, the messenger of Satan to buffet me, lest I should be exalted above measure. For this thing I besought the Lord thrice, that it might depart from me. And he said unto me, My grace is sufficient for thee: for my strength is made perfect in weakness. Most gladly therefore will I rather glory in my infirmities, that the power of Christ may rest upon me.”  The Lord had given Paul several wonderful revelations about Himself and the Church.  This could cause a person to become vain or proud and exalt himself.  To prevent this from happening, the Lord gave Paul a “thorn in the flesh.”  This was some infirmity given to Paul so that he would not exalt Himself.  At this point, Paul had not exalted himself, but in order to keep him from doing that, the Lord graciously gave him some kind of infirmity to keep him humble.  Paul prayed three times to have this removed, but then the Lord gave him another wonderful revelation…he had God’s grace and that’s all he would ever need.

The Lord may even bring sickness or disease upon us.  John 9:1-3 gives us one such example.  “And as Jesus passed by, he saw a man which was blind from his birth. And his disciples asked him, saying, Master, who did sin, this man, or his parents, that he was born blind? Jesus answered, Neither hath this man sinned, nor his parents: but that the works of God should be made manifest in him.”  In this case, the Lord allowed this man to be born blind so that He could heal him, and others would see that it was the work of God that healed him.  His sickness would eventually bring glory to the Lord.

It’s evident that some of our trials and troubles may come from the Lord.  How can we know if our trials are coming from the Lord or from Satan?  This can be hard to discern.  When we are going through a difficult time, we should pray, asking the Lord if He is trying to teach us something.  Perhaps it may be needed discipline.  Perhaps we need more patience.  I often say that before we ask the Lord to relieve us of our sufferings, we should first ask Him if this is from Him and if He is trying to teach us some lesson.  (209.8)