Diversify. Don't put all your eggs in one basket.
1) If you are an owner or partner in the company -- obviously by definition you will have money or sweat equity invested in it.
2) If your company is small but turning a profit, and your equity share gives you some meaningful influence on how the company is run, then maybe it is OK especially if your company needs the capital you put into it just to keep going. In that case, your investment may help you keep your job.
3) But, if you are a lower level employee in a huge company and are thinking of buying a few stocks, I think not.
First, buying a few stocks will probably not permit you to influence management decisions so it won't improve your job security.
On top of that, you have to realize that your biggest investment is not your house but your job. It's your job that provides your income and permits you to invest in other things -- like your house.
So, if you are working for a big company, you already have placed your biggest investment -- your time, your talents, your reliance on the company for income -- in that company. It's not a good idea to put much more than that in one place in my view.
Of course, it depends. If you think the company is just the greatest on earth and you trust the management, then maybe.
But remember the company can easily be bought out -- and everything can change very quickly so you have to keep track of your investment just as you would any other investment. Check the stock market reports on it very frequently and get out when the signals suggest that it would be wise.