Mt 7:7 Ask, and it shall be given you; seek, and ye shall find; knock, and it shall be opened unto you: 8 For every one that asketh receiveth; and he that seeketh findeth; and to him that knocketh it shall be opened. 9 Or what man is there of you, whom if his son ask bread, will he give him a stone? 10 Or if he ask a fish, will he give him a serpent? 11 If ye then, being evil, know how to give good gifts unto your children, how much more shall your Father which is in heaven give good things to them that ask him?
These verses give us great insight: God gives good gifts to His children. We don't always see what is best for us, but He does. Just as our children sometimes ask us for things that we know are not good for them or they aren't ready for, we do the same with God. He knows perfectly what is best and when the time is right!
Mt 6:31 Therefore take no thought, saying, What shall we eat? or, What shall we drink? or, Wherewithal shall we be clothed? 32 (For after all these things do the Gentiles seek:) for your heavenly Father knoweth that ye have need of all these things. 33 But seek ye first the kingdom of God, and his righteousness; and all these things shall be added unto you.
God knows our needs and promises to give us what is good for us. Our primary objective is to seek His will and obey Him in all things:
Joh 15:7 If ye abide in me, and my words abide in you, ye shall ask what ye will, and it shall be done unto you.
1Jo 3:22 And whatsoever we ask, we receive of him, because we keep his commandments, and do those things that are pleasing in his sight.
1Jo 5:14 And this is the confidence that we have in him, that, if we ask any thing according to his will, he heareth us:
Sometimes our struggles or tribulations are meant for our good, to achieve God's purpose. We should be willing to accept a "no" from God:
2Co 12:8 For this thing I besought the Lord thrice, that it might depart from me. 9 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. 10 Therefore I take pleasure in infirmities, in reproaches, in necessities, in persecutions, in distresses for Christ's sake: for when I am weak, then am I strong.
Sometimes we ask for things for selfish reasons:
Jas 4:3 Ye ask, and receive not, because ye ask amiss, that ye may consume it upon your lusts.
We need to learn to trust God and His timing:
Isa 55:8 For my thoughts are not your thoughts, neither are your ways my ways, saith the LORD. 9 For as the heavens are higher than the earth, so are my ways higher than your ways, and my thoughts than your thoughts. 10 For as the rain cometh down, and the snow from heaven, and returneth not thither, but watereth the earth, and maketh it bring forth and bud, that it may give seed to the sower, and bread to the eater: 11 So shall my word be that goeth forth out of my mouth: it shall not return unto me void, but it shall accomplish that which I please, and it shall prosper in the thing whereto I sent it. 12 For ye shall go out with joy, and be led forth with peace: the mountains and the hills shall break forth before you into singing, and all the trees of the field shall clap their hands. 13 Instead of the thorn shall come up the fir tree, and instead of the brier shall come up the myrtle tree: and it shall be to the LORD for a name, for an everlasting sign that shall not be cut off.
Ps 145:15 The eyes of all wait upon thee; and thou givest them their meat in due season. 16 Thou openest thine hand, and satisfiest the desire of every living thing. 17 The LORD is righteous in all his ways, and holy in all his works.
La 3:25 The LORD is good unto them that wait for him, to the soul that seeketh him. 26 It is good that a man should both hope and quietly wait for the salvation of the LORD.