Note: this article is not intended to suggest that the Mahabrahma is linked to whatsoever in other religions.
In Buddha's days there were many many different teachings, one popular one was Brahmanism. In fact the Brahma was still worshipped nowadays. Brahma was known to be "The Supreme One, the All-mighty, the All-seeing, the Ruler, the Lord of all, the Maker, the Creator, the Chief of All".
In Buddhism, the Mahabrahma resides in the 1st Jhana plane, the first plane among the 8 jhanic planes. There were higher realms above where he lives that he was unaware of, and above it all, beyond the 8 Jhanic planes and all Samsaric planes, is Nirvana. Nevertheless all the devas below the 1st Jhana planes considered him as the Creator God. Buddha did not suscribed to the belief of such a notion that the Universe and its Inhabitants were the Creation of the Mahabrahma. He met with the Brahma, asked him questions which he could not answer. Eventually he has took refuge in the Buddha, Dharma, Sangha.
The Buddha was also known to have said this,
If the creator of the world entire
They call God, of every being be the Lord
Why does he order such misfortune
If the creator of the world entire
They call God, of every being be the Lord
Why prevail deceit, lies and ignorance
And he such inequity and injustice create?
If the creator of the world entire
They call God, of every being be the Lord
Then an evil master is he, (O Aritta)
Knowing what's right did let wrong prevail!
When the previous universe was destroyed and this universe was formed, the Mahabrahma was first to be reborned. Other subsequent brahmas/devas were to be reborned.
'On this, brethren, the one who was first reborn thinks thus to himself: " I am Brahmà , the Great Brahmà , the Supreme One, the Mighty, the All-seeing, the Ruler, the Lord of all, the Maker, the Creator, the Chief of all, appointing to each his place, the Ancient of days the Father of all that are and are to be. 'These other beings are of my creation. And why is that so ? A while ago I thought, 'Would that they might come!' And on my mental aspiration, behold the beings came." DN 1 2:5
In reality, the universe works by the law of Karma and he has no control over the system of karma.
The Venerable Ledi Sayadaw, a highly renowned Myanmar scholar-monk of the first part of this century, gave a careful analysis of the powers of Maha Brahma in his Niyama Dipani (MB pp. 138-39). He states that although Maha Brahma can perform all sorts of transformations, he cannot actually create independent creatures, change the kammic law of cause and effect, or keep anyone from growing old or dying. Brahma can use his special powers to transport a man to the brahma plane for a short visit, but he cannot ensure that someone will be reborn there.
from http://www.jenchen.org.sg/vol5no3f.htm:
When he came to know about Sakyamuni Buddha in the human world who speaks of the universal truth, he was curious and arrived at the human world with the intention to debate with the Buddha. The Buddha, with his ability to know another's mind, knew his intention and asked, "You claim to be the creator of the human race and all things in the universe, is this a fact?"
The king replied, "Yes, it is."
Buddha continued to question him, "Since you created life, why did you also create death? Is death created by you too?"
The king paused for while, and thinking that everyone loves life and nobody welcomes death, he replied, "I did not create death."
Buddha asked him again, "All human beings experience sickness, did you create sickness also?" The king knew that nobody likes to be ill, and he replied, "I did not create illness."
Buddha asked many questions in succession, but the king denied that he created them. Eventually, he admitted that he did not create the universe and all things in it, and certainly not the human race. The king of heavens was full of regrets and he felt ashamed. Finally, he accepted Buddha as his teacher and invited Him to spread the Dharma in the heavens.
-----------------------------
http://www.mahindarama.com/e-library/whybuddhism2.html
"To those who talked about the first cause of this world, the Buddha responded by saying that it is impossible to find a first cause since everything is changing, interdependent and conditioned by other things. Something that acts as the cause in the present may become the effect in the future. Later that same effect may again become the cause. Such phenomenon continues ad infinitum. It is called the universal law of Anicca or impermanency."
However, Buddhism is largely Agnostic rather than Atheist. We believe that it is not important to our spiritual practise, enlightenment, and liberation from samsara.
"Malunkhyaputta Sutta stresses that whether the universe was created or uncreated, finite or infinite, is irrelevant to our main spiritual concerns: the cause and cessation of suffering:
"Therefore Malunkhyaputta, bear the undeclared as undeclared. Malunkhyaputta, what are the not declared? The world is eternal, is not declared by me. The world is not eternal, is not declared by me. They are not essential for the principles of the holy life, they do not lead to turning away, to detachment, to cessation, to appeasement, to realisation, to enlightenment and to extinction. Malunkhyaputta, what are the declared by me? This, is unpleasant, is declared. This, is its arising, is delcared. This, is its cessation is declared. This is the path to its cessation, is declared. Malunkhyaputta, why are these declared by me? These are the essentials for the principles of the holy life, they lead to turning away, to detachment, to cessation, to appeasement, to realisation, to enlightenment and to extinction. Malunkhyaputta, I declare them." MN 64"