Do you have to follow a monastic lifestyle to attain enlightenment?
At first approximation, the answer is: yes in Theravada, no in Mahayana.
Since probably as early as Milindapanha (~100 BCE) and most certainly by the time of Vissudhimagga (~430CE), the orthodox (~Theravada) position was, you must be a monk to attain Nirvana .
But since you asked about Enlightenment , I should point out that Enlightenment is the goal of Mahayana, while in Theravada, the final goal is usually called Nirvana
(Nibbana in Pali), not Enlightenment (Bodhi in Pali).
In Mahayana, Enlightenment can be attained by a layperson.
These are "official" positions (as much as we can talk about official positions in such a heterogeneous conglomerate of teachings as Buddhism).
Informally, in my own understanding, what some Mahayana schools call "Enlightenment" is what Theravada schools call mere "stream-entry".
Other Mahayana schools however have this notion of multiple levels (bhumi), in which what Theravada calls "stream-entry" is level 1 of 10, with Final Enlightenment counted as 11th.
It kinda gets complicated from "stream-entry" onward, because the boundaries of "self" no longer apply, so it is difficult to talk about Enlightenment with no subject to tie it to.
Anyway, from practical perspective, the point is, it is extremely difficult to make any meaningful progress towards Enlightenment/Nirvana if most of your focus is on pursuing material ends (success, wealth, entertainment, helping your relatives achieve the same).
In order to get pretty close to X while leading a semi-normal life, one's top priority must be spiritual practice, followed by family and everything else.
This basically means, squeezing study of Buddhist philosophy here and there, making meditation part of your daily routine, and, most importantly, deliberately utilizing your family & work situations as shootingrange for Dharma practice.
buddhism.stackexchange.com/users/43/Andrei Volkov
Enlightenment is entirely mental; it can be achieved
any where, at any time, and under any circumstance with the right emotional commitment.
A monastic lifestyle only has to be followed on the emotional level; you can have vast amounts of material wealth if it does not corrupt your mind by creating any forms of obsession over that wealth.
buddhism.stackexchange.com/users/7541/anon
My understanding of Buddhism is that you can attain enlightenment provided you devote yourself to the Four Noble Truths and Noble Eightfold Path.
I have met enlightened people from time to time and not all of them were monastics.
If you're new to Buddhism and the above concepts are unfamilar to you, there are some concise summaries of basic concepts at
What should everyone know about Buddhism .
buddhism.stackexchange.com/users/None/
The question is who will get enlightened, the body or the mind ?
The answer is obvious, the mind.
So when it is only the mind that gets enlightened all the external things are just auxiliary.
So the answer to your question is both yes and no. YES Actions directly affect the mind.
So by following a monastic life your actions will be limited to only those set of activities that help in controlling the mind and getting enlightened.
Enlightenment will be quicker and easier because you will have to involve less in material activities.
NO
Because mind is what matters, if you can keep an ascetic attitude and mentality even when living a material life, you can certainly attain enlightenment.
But it will be difficult to maintain a balanced mindset for a beginner this way because material actions will always be affecting his mind.
So if mind can not be controlled while living in samsara then a monastic life should be preferred, otherwise it's not mandatory.
For an enlightened person it doesn't matter whether he lives in a monastery or in samsara as his mind becomes equipoised.
But until that state of mind is achieved a monastic life should be preferred.
buddhism.stackexchange.com/users/82/jabahar
From Anapanasati Sutta: Mindfulness of in-&-out breathing, when developed & pursued, is of great fruit, of great benefit.
Mindfulness of in-&-out breathing, when developed & pursued, brings the four frames of reference to their culmination.
The four frames of reference, when developed & pursued, bring the seven factors for awakening to their culmination.
The seven factors for awakening, when developed & pursued, bring clear knowing & release to their culmination.
Here
Buddha says mindfulness alone and the affects it arouses are enough for enlightenment.
buddhism.stackexchange.com/users/70/user70
There is a lesser-known, non-monastic tradition in Tibetan Buddhism: a Ngagpa may marry and have children.
buddhism.stackexchange.com/users/163/rem
Much information is covered in the other answers, hence a small clarification of what is generally belief in Sri Lanka.
You can become Enlightened while a house holder
but you have to ordinate before 7 days after becoming enlightened.
buddhism.stackexchange.com/users/295/Suminda Sirinath S. Dharmasena
You may get a understanding, of what's the matter with when reading Cula-dukkhakkhandha Sutta:
The Lesser Mass of Stress for example and to know of what the Buddha had to say.
Yes, right livelihood (livestyle), one of the factor of the Noble Eightfold path is necessary.
(Note: this answer has not been given with the agreement to be means of trade or the purpose of trade and keep people trapped and bound.
How you handle it lies in your sphere, but does not excuse the deed here either.)
buddhism.stackexchange.com/users/11235/Samana Johann
How do the different groups/sects of Buddhism view attaining enlightenment and living a common life? In other words, do they think it is possible to be a common person and achieve enlightenment? Even for someone who has a family, friends and coworkers that aren't Buddhists?
Do you have to follow a monastic lifestyle to attain enlightenment?
buddhism.stackexchange.com
<enlightenment>
buddhism.stackexchange.com/questions/23
buddhism.stackexchange.com/users/37/eric
At first approximation, the answer is:  yes  in Theravada,  no  in Mahayana.   Anyway, from practical perspective, the point is, it is extremely difficult to make any meaningful progress towards Enlightenment/Nirvana if most of your focus is on pursuing material ends (success, wealth, entertainment, helping your relatives achieve the same). However, Buddha says mindfulness alone and the affects it arouses are enough for enlightenment. It is thought that enlightenment may be achieved by laypersons in certain divisions of Buddhism. However, opinions are inconsistent. Some schools refer to achievement of various levels (bhumi) of enlightenment or "stream-entry".  Spiritual practice should be considered to be a priority over material ends to achieve enlightenment. A monastic life is not necessary to achieve enlightenment. Enlightenment is a mental endeavour and even those who live a material life may achieve it by following Buddhist teachings.
It is thought that enlightenment may be achieved by laypersons in certain divisions of Buddhism. However, opinions are inconsistent. Some schools refer to various levels (bhumi) of enlightenment or "stream-entry". It is difficult to achieve enlightenment if material ends are of a higher priority than spiritual practice. A monastic life is not necessary to achieve enlightenment. Enlightenment is a mental endeavour and even those who live a material life may achieve it by following Buddhist teachings.