There is Position which almost does what you need out of the box, unfortunately it checks for exact equality while you need only numerical equality. On the other hand the mesh generation doesn't guarantee that the mesh nodes will be close enough to the given coordinates to make Equal consider them equal, so on my computer your solution will fail because:
Nearest[nnodes, {300, 0}]=={300,0}
(* False *)
What I would suggest is a combination of Nearest and Position:
findIds[nodes_, coords_] := Flatten[
Map[Position[nodes, First@#] &, Nearest[nodes, coords]]
]
which I think should be somewhat more robust and also a bit faster. Depending on what you are using that for, you might add some error checking...
Here is a slightly changed version that seems to be somewhat faster, at least if the numbers of nodes to find is not too large:
findIds[nodes_, coords_] := Module[{
nodestofind = Nearest[nodes, coords][[All, 1]]
},
Flatten[Position[nodes, Alternatives @@ nodestofind]]
]
As kglr has mentioned in a comment, since version 11 there is also the possibility to get the index directly from Nearest like this:
Flatten[Nearest[nodes->"Index",coords,1]]
Actually using Automatic instead of "Index" would also work, but I think "Index" is a bit clearer and unlike Automatic is documented. Unsurprisingly this is then also by far the fastet of the given alternatives. Defining a function for it would be trivial but almost seems superfluous...