Mathematica is a rewrite language.
x_ means "match something and give it the name
x for rewrite purposes".
Subscript[x,1]_ is meaningless, because
Subscript[x,1] isn't a symbol.
One way to deal with things like this is to deconstruct them and reconstruct what you want.
myfunction[var_Subscript] := Subscript[var[], var[]] + var[]^2
The argument pattern here recognizes anything with the head
Subscript. The function body deconstructs it and reconstructs using both parts of the
(* 4 + Subscript[x, 2] *)
If you only want it to work when the subscript is 1, perhaps the handiest way is to put that in the argument pattern and do your deconstruction there:
anotherway[Subscript[x_, 1]] := Subscript[x, 1] + 1
(* 1 + Subscript[y, 1] *)
You can also do implement this kind of restriction with
Condition, left as an exercise for the reader.