It should be noted that praying to receive the Holy Ghost and praying by the power of the Holy Ghost are two separate things. Praying by the power of the Holy Ghost assures that we are in tune with the will of God.
Without the guidance of the Holy Spirit, “we know not what we should pray for as we ought” (Rom. 8:26). But we read that the Nephite Twelve, while praying, “did not multiply many words, for it was given unto them what they should pray, and they were filled with desire” (3 Ne. 19:24). Our most productive prayers will include all three members of the Godhead; we will address our prayers to our Father in Heaven, pray in the name of Jesus Christ, and pray as prompted by the Holy Ghost. Having the Holy Ghost express God’s will for us through our prayers should be the goal of all Latter-day Saints. That way, “the time will come when we shall know the will of God before we ask. Then everything for which we pray will be right. That will be when, as a result of righteous living, we shall so enjoy the companionship of the Spirit that he will dictate to us what we should ask.”
Individuals who ask for the companionship of the Holy Ghost and pray by the power of the Spirit will discover marvelous things happening in their lives. God will give them temporal and spiritual direction, and at length their lives will be spiritually transformed through Christ. The time will come when these Saints will be “purified and cleansed from all sin,” and then they will “ask whatsoever [they] will in the name of Jesus and it shall be done.
“But know this, it shall be given [them] what [they] shall ask”(D&C 50:29-30).
Ensign, January 1996, p. 38 (“After This Manner… Pray Ye” by Donald W. Parry)