Why not? People do this all the time. Start on this forum with Serial Input Basics.
It is pretty simple to design your own command/communications protocol. For example, serial commands could look something like this:
<s4,1> set digital output pin 4 to 1
<p9,150> set PWM on pin 9 to 150
<g2,0> get analog input on A2