How can I animate the position of a Bézier curve segment as shown in the images below?
You can 'Hook' the control point of the curve by pressing Ctrl+H while in edit mode, with the point of the curve you want to move selected and choosing 'Hook to new object'. Adding the hook via this shortcut is just a quick way of setting up the hook modifier, which will be present on the curve after the shortcut is pressed.
This will create an 'Empty' object which can be animated. The control point of the curve will be parented to the position of the empty and will follow the empty wherever you animate it to.
To directly animate a curve's segment, without hooks or shapekeys, you can enable the AninAll addon. It allows you to create keyframes for each control point.
Another way you could do this is with a shape key:
Neither this method nor the hook method is inherently superior to the other. Here are some of the advantages and disadvantages of this method:
As usual, you should know your options, consider the situation, and decide which method is best in that particular case.