If you have not been given the gift of tongues you should not be praying or speaking in tongues. You will know if you have the gift as you will use it to promote The Kingdom of God and use it to help people be like Jesus. Any other usage is not of God as it is for your own purposes and/or Satan’s purposes.
Remember that tongues are a gift and not something that automatically happens at the Baptism of The Holy Spirit or conversion so to try and cause a person to speak in tongues is not of God as God gives the gift and does not train a person to be able to speak in tongues.
Tongues are a sign to them that do not believe (which could occur if the person understood someone speaking a language they did not know). So its usage in a Christian situation does not appear to be what it is designed for. It would only be used for evangelism as it serves no purpose for a believer, unless the gift of interpretation of tongues was present. Even then it is not necessary as the language of the congregation is sufficient. Why would Jesus need to use tongues when there was a common language to convey His message to the church or person?
Prophesy seems to be the gift that is to minister to the church and not tongues.
1 Cor l4:22 Wherefore tongues are for a sign, not to them that believe, but to them that believe not: but prophesying serveth not for them that believe not, but for them which believe.
1 Cor l2:30 Have all the gifts of healing? do all speak with tongues? do all interpret?
But it does have its place in a church apparently.
1 Cor l4:39 Wherefore, brethren, covet to prophesy, and forbid not to speak with tongues.
So when are you to speak or pray in tongues?
When The Holy Spirit says too and He will give you what to say. Any other time does not serve the purposes of The Kingdom of God and is a waste of time, edifying the speaker only.
1 Cor l4:2-4 For he that speaketh in an unknown tongue speaketh not unto men, but unto God: for no man understandeth him; howbeit in the spirit he speaketh mysteries. But he that prophesieth speaketh unto men to edification, and exhortation, and comfort. He that speaketh in an unknown tongue edifieth himself; but he that prophesieth edifieth the church.
A person who prays to God in tongues is understood only by God as God alone understands what the person is saying. It does not build the church up, unify it or help another. If The Holy Spirit is behind it then He will speak spiritual things but no one will understand them. Better to prophesy, Paul says, so that all will learn.
As the person is not understood he will only edify (build up spiritually) himself. He will not build the church up so it is in a sense wasted tongues and does not fulfill the purpose for which the gift was given.
If the Spirit has told to give a message in tongues He will also provide an interpreter. If there is no interpreter then better be silent as it is implied by this The Spirit is not behind it.
It must be at the instigation of The Holy Spirit and guided by Him or it will be a fleshly prayer and not serve the purposes of God.
Tongues are to be used for evangelism for unbelievers and praying in tongues does not serve this purpose as it is not for an evangelistic type situation, unlike the true gift of tongues.
Jesus said His followers would speak in tongues but Jesus and people in the Old Testament are not recorded as speaking in tongues. This was because the Holy Spirit had not yet been given to mankind in His fullness until Jesus left earth and The Holy Spirit replaced Him.
Act 19:6 And when Paul had laid his hands upon them, the Holy Ghost came on them; and they spake with tongues, and prophesied.
The purpose of tongues was to communicate the Gospel to people who did not understand your tongue.
Act 2:11 Cretes and Arabians, we do hear them speak in our tongues the wonderful works of God.
This is the true gift of tongues, the preaching in your own language and being understood in the language of another. This does happen but rarely these days as it seems to be ignored where tongues is concerned, but I does happen at times but not in the west usually.
However, God may use it to pray something into existence in the same way He uses ordinary prayer, using tongues so that Satan does not know what is being prayed into existence. There is also the possibility The Holy Spirit will guide you to pray in tongues when you do not know what to pray (Ro 8:26-27).
However, as we are to pray in secret it would be rare for this type of usage of tongues to be in a church situation.
Act 10:46 For they heard them speak with tongues, and magnify God. Then answered Peter,
Tongues are a gift of The Holy Spirit to be used for the purposes of The Kingdom and nothing else. The gifts are for the promotion of the Kingdom and the helping of people to become more Christ like and are not for personal use. So praying in tongues would seem to contradict this if it was not guided by The Holy Spirit for the purposes of The Kingdom.
Is it right to pray in tongues so as to edify yourself (build yourself up spiritually)?
The gifts are for the building up of each other (1 Cor 12:7) and for proving the Gospel of the Kingdom. (Luke 8:1-2). The passage referred to is 1 Cor 4:14
1Co 14:4 He that speaketh in an unknown tongue edifieth himself but he that prophesieth edifieth the church.
This verse is almost like a warning by Paul that it is selfish to edify yourself and not devote your energies in service to the body.
The objective of the gifts is to build another up and through this build yourself up. This is why we are told to build up one another Just as God builds us up. As you serve others and help them mature, you yourself are matured.
Speaking in a language in which you do not know what you are saying has two disadvantages:
You could be saying something wrong and not know it and so are actually doing the opposite of edifying yourself
You are building up yourself and not letting God do it so you may be building up the wrong areas of your life as well as missing out on God's blessing. Remember that Satan will encourage you to build up wrong areas in your life and not fulfill God’s purposes in other areas.
We are never to promote ourselves or build our self-esteem from the things we do. Edifying yourself seems to be against this principle and may give the devil access to you through spiritual pride so that he may even be able to 'guide' these 'gifts'.
Self-edification (which tongues does unless used as Jesus desires it to be used) is not from God. We are to let another person praise us, preferably someone not of our circle of friends but outside of it. Then it will be true praise.
Paul also said:
1 Cor 14:14 For if I pray in an unknown tongue, my spirit prayeth, but my understanding is unfruitful.
So your understanding of God is not built up and you are not drawn closer to Him. What then is built up? It is not your spirit as you do not understand what you are saying. It has to be the flesh as that is what is left.
The only real case I can think of for praying in tongues is in Romans 8:26,27 when we do not naturally know what to pray for and pray as guided by Holy Spirit for the burden He has placed on your heart or the problem you are facing at that time. He is listening to us and our needs as well as praying for us. So it is not self-edification but a cry for help.