Please mark my emphasis in the verse below.
"Dear friends, if our hearts do not condemn us, we have confidence before God and receive from him anything we ask, because we obey his commands and do what pleases him."
~1 John 3:21-22
God clearly shows us by His Spirit in the above verse that if we obey His commands and do what pleases Him, we will receive from Him anything we ask. So, you should be able now to understand the reason for the following verse.
"and find out what pleases the Lord."
~Ephesians 5:10
Got it? Find out what pleases the Lord.
Why?
Well, because if you want Him to intervene in answer to your prayers, if you want to receive from Him anything you ask, you need to learn what pleases Him, and do it.
I did some search in the bible and came up with 6 things that please the Lord. Here they are:
#1: Faith
"And without faith it is impossible to please God, because anyone who comes to him must believe that he exists and that he rewards those who earnestly seek him."
~Hebrews 11:6
Faith is acting on what God says at the risk of rejection, failure, being labeled a fool, and in spite of your doubts and fears.
#2: Interceding for everyone
"I urge, then, first of all, that requests, prayers, intercession and thanksgiving be made for everyone- for kings and all those in authority, that we may live peaceful and quiet lives in all godliness and holiness. This is good, and pleases God our Savior,"
~ 1 Timothy 2:1-3
When we take out time to talk to God on behalf of others instead of just our own needs, He likes it; it pleases God.
#3: Doing good and sharing our blessings with others
"And do not forget to do good and to share with others, for with such sacrifices God is pleased."
~ Hebrews 13:16
When God blesses you, do not hoard it, or eat it alone. Share with others. This makes God happy.
#4: Obedience to your parents
"Children, obey your parents in everything, for this pleases the Lord."
~ Colossians 3:20
As long as you are still under the jurisdiction and authority of your parents – children, 20 and below – obedience to your parents in everything pleases God. This is also true – regardless of your age – as long as they have responsibility over you, and pay for the consequences of your decisions.
Note: For responsible adults, the commandment is not to obey them in everything, but rather to honor them.
#5: Caring for your own family
"But if a widow has children or grandchildren, these should learn first of all to put their religion into practice by caring for their own family and so repaying their parents and grandparents, for this is pleasing to God."
~ 1 Timothy 5:4
Charity begins at home.
#6: Gifts to Ministers of the Gospel
"I have received full payment and even more; I am amply supplied, now that I have received from Epaphroditus the gifts you sent. They are a fragrant offering, an acceptable sacrifice, pleasing to God."
~ Philippians 4:18
When you provide for men and women of God who labour in the gospel, you bring pleasure to the One that sent them.
"May the God of peace, who through the blood of the eternal covenant brought back from the dead our Lord Jesus, that great Shepherd of the sheep, equip you with everything good for doing his will, and may he work in us what is pleasing to him, through Jesus Christ, to whom be glory for ever and ever. Amen."
~Hebrews 13:20,21