Is it okay to print an ebook downloaded online?
There are two cases here:


You bought and downloaded the ebook legally. In this case it most likely came with a license, stating exactly what you are allowed to do with it. Most of the time you will be allowed to print it for personal use. However, there are also ebooks available by library services, which you only get for a certain amount of time (e.g. two weeks). In this case, printing it would be just as illegal as going into a library, getting a book, go to a copy shop, print the whole thing and then return it. In most cases, such library services will have a way to prevent or at least hinder printing, so if you need special software and some "hacks" you found online to print the book, you have to be careful.
You downloaded the ebook for free. In this case the question at hand is not if you can print it or not, it is if the download was legal or not. There are books available online for free, but many of them are not legal. If in doubt, contact the original author. I would say that if you downloaded an ebook and then print it out, the printing itself doesn't make a potential illegal download any worse - unless of course you distribute the book - but I'm no expert for copyright, so I can't give a definitive answer on that.


I will furthermore not comment on "how bad" an illegal download of an ebook is, depending on who you ask it might differ from "who cares?" to "you are going to jail!".