For you were once darkness, but now you are light in the Lord. Live as children of light (for the fruit of the light consists in all goodness, righteousness and truth) and find out what pleases the Lord.
The modern American church conveniently misses these verses most of the time.
The principle is not difficult to understand. "For you were once darkness, but now you are light in the Lord." In other words, a change has taken place. You are no longer the same as you used to be. What used to be dark has been illuminated by the Spirit of Christ. I know I am using passive voice, but I think it is necessary because we are starting with a self perspective, considering what has happened within our selves. And what has happened has happened by the power of God working in us; we are basically passive, powerless, dead in sin (Ephesians 2:1) as the new life from God starts to flow into us. God has arrived, and He has forged a change, a real, honest-to-goodness observable change. Darkness is now light.
And then Paul says, "Live as children of light." If you go back to the previous paragraph (Ephesians 5:3-7), you see the list of things that belong to darkness: sexual immorality, impurity, greed, obscenity, foolish talk, coarse joking. These are the lifestyles of the disobedient, and Paul tells us that those who live in such a way are idolaters and will not have any inheritance in the Kingdom of God; God's wrath comes on those who live disobediently like this. These are the characteristics of those who live in darkness and not in the light of the Lord. They are things that the children of light should not do.
Many people recoil from reading such a statement. They decide that Paul was a legalist, at least in this chapter he was. They decide that this does not fit with their idea of a gracious and loving God who should allow them to pursue their earthy desires and not get in the way of their pleasure, else how could He possibly be loving?
But God's word is quite clear that those who experience the life changing power of the Holy Spirit will demonstrate through their changed lives that He has been at work. This has nothing to do with legalism, and everything to do with a real God who uses His real power to effect real changes in real people. And because all this is real (i.e. true), it is also something that other people can see and observe.
Paul tells us to live as children of light, and then he says my favorite part of the whole thing: "and find out what pleases the Lord."
We have a tendency to think we can decide what pleases the Lord based on our idea of what we think He ought to like, if He is kind and loving and forgiving. We have a tendency to rationalize blatant sin simply because we want to participate in it, saying, "God is nice. He would want me to enjoy this. Even if He doesn't like it very much, He will forgive me because He loves me so much and so unconditionally that He really doesn't care what I do or how I live." (Which is really stupid, the fact of the matter being that God loves us so much that He very deeply cares what we do and how we live, but I will save that rant for a different day.)
We are supposed to find out what pleases the Lord, and I'll tell you what: nobody is going to find out what pleases the Lord by looking deep into his or her own sinful human heart (Jeremiah 17:9). We find out what pleases God by looking into God's revelation to us of Himself: The word of God, scripture.
Scripture is the light that helps us live as children of light. "Your word is a lamp to my feet and a light for my path." (Psalm 119:105, NIV, 1978)
All of scripture is God breathed and profitable (2 Timothy 3:16). And when Paul spoke of "scripture" he was talking about the Old Testament, because the New Testament had not yet been formed; I don't think Paul was arrogant enough to assume that his own letters would one day be in the cannon of God's Holy Word. The Apostle Paul loved the Old Testament, and we should, too. The Old Testament is full of truth about the character of God and truth about what God loves and what He finds detestable. We would do well to read it to find out what pleases the Lord, and to put into practice what we discover there.