Writing by hand strengthens the learning process. When typing on a keyboard, this process may be impaired.
When writing by hand, our brain receives feedback from our motor actions, together with the sensation of touching a pencil and paper. These kinds of feedback are significantly different from those we receive when touching and typing on a keyboard.
We read differently on a screen than on paper. If you’re interested in why, check out the excellent book Proust and the Squid and The Shallows: What the Internet is Doing to Our Brain.