Yes, but only if you're required to buy it for class (for example if you're enrolled in an online-only course).
If you bought a school computer out of convenience (in other words, you could complete the class without it), you can't deduct it.
Note: For the Lifetime Learning Credit, you can only deduct equipment expenses that were bought directly from the education institution.