user533: I was raised in a Catholic environment, however I'm adding more and more Dhamma in my life, currently I spend much more time with Buddhists practices than Catholics.
the point is that I still keep the habit of praying to God before going to sleep (and before flying too), but if I'm not mistaken this is seen as something bad in Buddhism (wrong view/attachment to rituals)
Can someone explain what are the bad consequences, from a Buddhist's perspective of praying to God? If any.

user199: Like you, I was raised Catholic. Like you, I now spend more time involved with the dharma than directly with Catholicism. However, I increasingly see a synergy between the two "systems", and not very much collision (the "orthodox" from both sides may disagree, but that doesn't make them right).
Crucial to me seeing this synergy was coming to see that the notion of "God" that I had in my childhood, and also the notion of God of most Buddhists I've met, is really not a very coherent notion at all. Or, put it more simply, it's wrong. If someone says Buddhists don't believe in God, it's important to know exactly what that person means by "God". Odds are they're talking about some kind of sky fairy or such like, and classic Catholicism doesn't believe in that either.
If you look a the works of St Thomas Aquinas -- maybe get yourself some commentaries first, before tackling the summae head on -- you'll find that the notion of God that is at the heart of Christianity (and, I'd add, Islam and Judaism) is far harder to pin down as something that is at odds with Buddhism. For example, trying to apply the words "permanent", "satisfying" or "self" to "God" is almost a category error. 
In conclusion, I wouldn't worry about prayer and praying -- in other words, just keep doing it if you want. Or not. Don't fret either way. And if you do continue, you can even develop it, but perhaps look into the contemplative side, since that has a lot in common with many Buddhist approaches -- especially Tibetan. I recommend reading "The Seven Story Mountain" by Thomas Merton as a useful story of one man's journey. Also, look into the work of Thomas Keating, on centering prayer.

user254: An archetypal Christian prayer is this one, from the Garden of Gethsemane:

And he said, Abba, Father, all things are possible unto thee; take away this cup from me: nevertheless not what I will, but what thou wilt.

You were asking about "wrong view".
My personal opinion is that there are not bad sentiments in this prayer:

"take away this cup from me" -- this cup is 'suffering'
"nevertheless not what I will" -- this is cessation of attachment


Other parts of the prayer don't have an obvious Buddhist corollary, i.e.:

Abba, Father, all things are possible unto thee

Except that, for all I know (and, to be clear, I don't know), even "prayer" (perhaps not that particular prayer) might be found in some forms of Buddhism (for example, like this). There may be a split in Buddhism which I'm not qualified to explain. Searching for someone else's description, I find e.g. this:

Nowadays, Buddhism is little more than a thing of tradition in most parts of Asia, and "Mahayana" has degenerated into a system of worship and prayer to numerous Buddhas and Bodhisattvas that hope, fear and superstition have populated the cosmos with. Ignorant of the Buddha's Teachings about Karma and the importance of developing spiritual self-reliance, people weak-mindedly turn for help and salvation to celestial beings. They imagine Buddhas and Bodhisattvas as remote from them -- somewhere in the sky, perhaps -- similar to the deities of other religions. And so, they miss the whole point of the Buddha"s parting injunction: "Work out your own salvation with diligence". Enlightenment is an intimate inner experience, not something that comes to us from outside.

It is (I still don't know) possible that the above quote is doing an injustice to what "Buddhist prayer" is.
For another point of view, you should see for example: this answer.
If you're interested, you might want to ask another question: perhaps about "Buddhist prayer", instead of about "praying to God".

One more thing, you also wanted to ask about "attachment to ritual".
I don't know how to answer that from a Buddhist perspective. Though I may be off-topic, let me try to address "Christian ritual".
The Quakers are a Christian sect who believe a number of things, an important belief being the priesthood of all believers, i.e. that you don't need a priest who intervenes between you and God.
The founder, George Fox, travelled around preaching. Margaret Fell became his wife, and this quote is her description of the first time she heard him preach. If you read it, you will see that he believes that Christ was divinely inspired, was in communion with God.
So, Jesus' prayer in Gethsemane isn't to be imagined as an empty ritual, but as an authentic, real experience. It's a description of what Jesus did.
Looking around the net for other places where this quote appears, I stumbled upon this which includes the quote,

As Jesus said, "I and the Father are one."

That quote sounds to me similar to the "already-having-been-saved" which Methexis mentioned, which is using the "Perfect tense" mentioned at the start of this answer.
Her profile links to several Buddhist (and other) blogs, which is more than I can read at the moment.
I guess my point was that according to some people, prayer isn't just ritual.

user43: Chogyam Trungpa spoke about theistic vs. non-theistic perspective:
For most people, God is a dualistic concept. Meaning, for a typical person the unspoken assumption is: "I am here and God is over there". So when I think about God, when I speak to God -- I inevitably imagine some power outside of myself. It is in this power that I place hope for good life and for salvation; it is this power that I blame for unfairness etc.
There are several problems with this approach. First by attributing to God the power to save us or to send difficulties etc. we alienate ourselves from our own power. In Buddhism (except Pure Land) our liberation is always in our hands. (As Trungpa said, no one is going to descent in the golden chariot to take care of you. In fact this very feeling of loneliness/hopelessness is one of the main ingredients for the gunpowder of Bodhi.) As long as you keep looking up to some higher power, how can you be the master of your life?
Second, by relating with external God, we confirm our own existence, our illusory ego. "I pray to God, therefore I exist." -- This is good old dependent-coarising at work. When that is, this is. From the arising of that comes the arising of this. So the more we praise God, the more we cement this little "I", the subject of God.
Instead, from the non-theistic perspective, "I" and "God" are two equally illusory ends of the same stick. It is not that I am infinite, and therefore I am God. Nor is it that "I" does not exist and everything is God. Neither is it that the little "I" is inside of, or a part of, God. Nor is it that God only exists as a concept of my mind. Rather, all of these are interpretations of the fundamental situation in which my power and the power of God is the same power, my will and the will of God is the same will, and my spontaneity and the spontaneity of God is the same spontaneity. Perhaps even this is implying too much. There is power / will / spontaneity, but no one who wields it. It just is. Using it and being used by it refers to the same activity.
Two of my teachers preferred to emphasize one side: using it. My Zen Master said: "People say, 'God bless you', but Enlightenment is when you bless God". My current teacher says: "utilize God". Both of these serve to remind us of our inherent mastery. The power is us, and we are the power.
So a regular prayer, addressing God as "You", from Buddhist perspective is counterproductive. It dependently co-creates "I", takes away our power, and leads astray from enlightenment. A better perspective is, as Jesus said, "I and the Father are one" (i.e. my true nature and the nature of God is one and the same). This corresponds to what Buddha called "a state of Brahma" (brahmapatta, AN 4.190) and praised as a valuable intermediate attainment. In Tibetan Buddhism there is this beautiful prayer, spoken from the perspective of Kuntuzangpo, the Primordial Buddha -- i.e. the nature of intrinsic awareness, before separation into beings, which is another way to refer to God. This prayer is perhaps as good as a prayer can get from Buddhist perspective.

user745: How you should consider what do to depends on your situation. Have you converted to Buddhism? Do you believe in an all powerful God? If you haven't converted to Buddhism and still believe in a God and are just adopting Buddhist practices because you find that they give you wellbeing I wouldn't worry about it too much. But if you are trying to work out the full path to awakening according to the teachings of the Buddha then there could be a problem.
If you have decided to strive for enlightenment according to the Buddhist path then belief in a God is problematic because it is in conflict with the teachings that all things apart from Nibbana are impermanent, incapable of giving true happiness, and are non-self. So if you believe in an all powerful God and pray to him that will reinforce that belief and interfere with developing right view.
Apart from interfering with right view and thus delaying the attainment of enlightenment until such view is corrected, I can't see any direct consequences. Belief in God can lead some people to be heedless thinking that God will look after them and everything will automatically turn out all right, and still others sometimes give up their consciousness to their concept of God, but the actual belief in the existence of God itself isn't going to create bad Karma directly or anything.

533: <p>I was raised in a Catholic environment, however I'm adding more and more Dhamma in my life, currently I spend much more time with Buddhists practices than Catholics.</p>

<p>the point is that I still keep the habit of praying to God before going to sleep (and before flying too), but if I'm not mistaken this is seen as something bad in Buddhism (wrong view/attachment to rituals)</p>

<p>Can someone explain what are the bad consequences, from a Buddhist's perspective of praying to God? If any.</p>
 199: <p>Like you, I was raised Catholic. Like you, I now spend more time involved with the dharma than directly with Catholicism. However, I increasingly see a synergy between the two "systems", and not very much collision (the "orthodox" from both sides may disagree, but that doesn't make them right).</p>

<p>Crucial to me seeing this synergy was coming to see that the notion of "God" that I had in my childhood, and also the notion of God of most Buddhists I've met, is really not a very coherent notion at all. Or, put it more simply, it's wrong. If someone says Buddhists don't believe in God, it's important to know exactly what that person means by "God". Odds are they're talking about some kind of sky fairy or such like, and classic Catholicism doesn't believe in that either.</p>

<p>If you look a the works of St Thomas Aquinas -- maybe get yourself some commentaries first, before tackling the summae head on -- you'll find that the notion of God that is at the heart of Christianity (and, I'd add, Islam and Judaism) is far harder to pin down as something that is at odds with Buddhism. For example, trying to apply the words "permanent", "satisfying" or "self" to "God" is almost a category error. </p>

<p>In conclusion, I wouldn't worry about prayer and praying -- in other words, just keep doing it if you want. Or not. Don't fret either way. And if you do continue, you can even develop it, but perhaps look into the contemplative side, since that has a lot in common with many Buddhist approaches -- especially Tibetan. I recommend reading "The Seven Story Mountain" by Thomas Merton as a useful story of one man's journey. Also, look into the work of Thomas Keating, on <a href="http://www.contemplativeoutreach.org/fr-thomas-keating" rel="nofollow">centering prayer</a>.</p>
 254: <p>An archetypal Christian prayer is this one, <a href="http://biblehub.com/mark/14-36.htm" rel="nofollow noreferrer">from the Garden of Gethsemane</a>:</p>

<blockquote>
  <p>And he said, Abba, Father, all things are possible unto thee; take away this cup from me: nevertheless not what I will, but what thou wilt.</p>
</blockquote>

<p>You were asking about "wrong view".</p>

<p>My personal opinion is that there are not bad sentiments in this prayer:</p>

<ul>
<li>"take away this cup from me" -- this cup is 'suffering'</li>
<li>"nevertheless not what I will" -- this is cessation of attachment</li>
</ul>

<hr>

<p>Other parts of the prayer don't have an obvious Buddhist corollary, i.e.:</p>

<ul>
<li>Abba, Father, all things are possible unto thee</li>
</ul>

<p>Except that, for all I know (and, to be clear, I don't know), even "prayer" (perhaps not that particular prayer) might be found in some forms of Buddhism (for example, <a href="http://buddhistfaith.tripod.com/pureland_sangha/id14.html" rel="nofollow noreferrer">like this</a>). There may be a split in Buddhism which I'm not qualified to explain. Searching for someone else's description, I find e.g. <a href="http://www.budsas.org/ebud/ebdha188.htm" rel="nofollow noreferrer">this</a>:</p>

<blockquote>
  <p>Nowadays, Buddhism is little more than a thing of tradition in most parts of Asia, and "Mahayana" has degenerated into a system of worship and prayer to numerous Buddhas and Bodhisattvas that hope, fear and superstition have populated the cosmos with. Ignorant of the Buddha's Teachings about Karma and the importance of developing spiritual self-reliance, people weak-mindedly turn for help and salvation to celestial beings. They imagine Buddhas and Bodhisattvas as remote from them -- somewhere in the sky, perhaps -- similar to the deities of other religions. And so, they miss the whole point of the Buddha"s parting injunction: "Work out your own salvation with diligence". Enlightenment is an intimate inner experience, not something that comes to us from outside.</p>
</blockquote>

<p>It is (I still don't know) possible that the above quote is doing an injustice to what "Buddhist prayer" is.</p>

<p>For another point of view, you should see for example: <a href="https://buddhism.stackexchange.com/a/192/254">this answer</a>.</p>

<p>If you're interested, you might want to ask another question: perhaps about "Buddhist prayer", instead of about "praying to God".</p>

<hr>

<p>One more thing, you also wanted to ask about "attachment to ritual".</p>

<p>I don't know how to answer that from a Buddhist perspective. Though I may be off-topic, let me try to address "Christian ritual".</p>

<p>The <a href="http://en.wikipedia.org/wiki/Quakers" rel="nofollow noreferrer">Quakers</a> are a Christian sect who believe a number of things, an important belief being the <a href="http://en.wikipedia.org/wiki/Universal_priesthood_(doctrine)" rel="nofollow noreferrer">priesthood of all believers</a>, i.e. that you don't need a priest who intervenes between you and God.</p>

<p>The founder, George Fox, travelled around preaching. Margaret Fell became his wife, and <a href="http://www.qis.net/~daruma/foxfell.html" rel="nofollow noreferrer">this quote</a> is her description of the first time she heard him preach. If you read it, you will see that he believes that Christ was divinely inspired, was in communion with God.</p>

<p>So, Jesus' prayer in Gethsemane isn't to be imagined as an empty ritual, but as an authentic, real experience. It's a description of what Jesus did.</p>

<p>Looking around the net for other places where this quote appears, I stumbled upon <a href="http://gracefulpresence.blogspot.fr/2005/03/but-what-canst-thou-say.html" rel="nofollow noreferrer">this</a> which includes the quote,</p>

<blockquote>
  <p>As Jesus said, "I and the Father are one."</p>
</blockquote>

<p>That quote sounds to me similar to the "already-having-been-saved" which <a href="https://buddhism.stackexchange.com/a/192/254">Methexis mentioned</a>, which is using the "Perfect tense" mentioned <a href="https://buddhism.stackexchange.com/a/3685/254">at the start of this answer</a>.</p>

<p>Her <a href="https://www.blogger.com/profile/09432640322896933989" rel="nofollow noreferrer">profile links</a> to several Buddhist (and other) blogs, which is more than I can read at the moment.</p>

<p>I guess my point was that according to some people, prayer isn't just ritual.</p>
 43: <p>Chogyam Trungpa spoke about theistic vs. non-theistic perspective:</p>

<p>For most people, God is a dualistic concept. Meaning, for a typical person the unspoken assumption is: "I am <em>here</em> and God is <em>over there</em>". So when I think about God, when I speak to God -- I inevitably imagine some power outside of myself. It is in this power that I place hope for good life and for salvation; it is this power that I blame for unfairness etc.</p>

<p>There are several problems with this approach. First by attributing to God the power to save us or to send difficulties etc. we alienate ourselves from our own power. In Buddhism (except Pure Land) our liberation is always in our hands. (As Trungpa said, no one is going to descent in the golden chariot to take care of you. In fact this very feeling of loneliness/hopelessness is one of the main ingredients for the gunpowder of Bodhi.) As long as you keep looking up to some higher power, how can you be the master of your life?</p>

<p>Second, by relating with external God, we confirm our <em>own</em> existence, our illusory ego. "I pray to God, therefore I exist." -- This is good old dependent-coarising at work. When <em>that</em> is, <em>this</em> is. From the arising of <em>that</em> comes the arising of <em>this</em>. So the more we praise God, the more we cement this little "I", the subject of God.</p>

<p>Instead, from the non-theistic perspective, "I" and "God" are two equally illusory ends of the same stick. It is not that I am infinite, and therefore I am God. Nor is it that "I" does not exist and everything is God. Neither is it that the little "I" is inside of, or a part of, God. Nor is it that God only exists as a concept of my mind. Rather, all of these are interpretations of the fundamental situation in which my power and the power of God is the same power, my will and the will of God is the same will, and my spontaneity and the spontaneity of God is the same spontaneity. Perhaps even this is implying too much. There is power / will / spontaneity, but no one who wields it. It just is. Using it and being used by it refers to the same activity.</p>

<p>Two of my teachers preferred to emphasize one side: <em>using it</em>. My Zen Master said: "People say, 'God bless you', but Enlightenment is when <em>you</em> bless God". My current teacher says: "utilize God". Both of these serve to remind us of our inherent mastery. The power is us, and we are the power.</p>

<p>So a regular prayer, addressing God as "You", from Buddhist perspective is counterproductive. It dependently co-creates "I", takes away our power, and leads astray from enlightenment. A better perspective is, as Jesus said, "I and the Father are one" (i.e. my true nature and the nature of God is one and the same). This corresponds to what Buddha called "a state of Brahma" (<em>brahmapatta</em>, AN 4.190) and praised as a valuable intermediate attainment. In Tibetan Buddhism there is <a href="http://www.rigdzindharma.org/uploads/6/9/5/6/6956478/prayer_of_kuntuzangpo.pdf">this beautiful prayer</a>, spoken from the perspective of Kuntuzangpo, the Primordial Buddha -- i.e. the nature of intrinsic awareness, before separation into beings, which is another way to refer to God. This prayer is perhaps as good as a prayer can get from Buddhist perspective.</p>
 745: <p>How you should consider what do to depends on your situation. Have you converted to Buddhism? Do you believe in an all powerful God? If you haven't converted to Buddhism and still believe in a God and are just adopting Buddhist practices because you find that they give you wellbeing I wouldn't worry about it too much. But if you are trying to work out the full path to awakening according to the teachings of the Buddha then there could be a problem.</p>

<p>If you have decided to strive for enlightenment according to the Buddhist path then belief in a God is problematic because it is in conflict with the teachings that all things apart from Nibbana are impermanent, incapable of giving true happiness, and are non-self. So if you believe in an all powerful God and pray to him that will reinforce that belief and interfere with developing right view.</p>

<p>Apart from interfering with right view and thus delaying the attainment of enlightenment until such view is corrected, I can't see any direct consequences. Belief in God can lead some people to be heedless thinking that God will look after them and everything will automatically turn out all right, and still others sometimes give up their consciousness to their concept of God, but the actual belief in the existence of God itself isn't going to create bad Karma directly or anything.</p>
