Can I quote books and articles I found online in my Master's thesis?
You want to reference reliable material - whether physical or virtual. If you read an article online in a refereed journal, or quote a standard book in your field that you read electronically, credit both the physical reference and the url in your bibliography.
References to, say, wikipedia or blog posts or unrefereed work you stumble across on someone's website may be problematic. To use them you have to make a case that they are correct and reliable.