(a) is different from the others. (a) describes an action, the filling of a bottle with water. The phrase can behave as a noun, adjective, or adverb. For example, in the following, it acts as an adverb to modify "necessary".
"To fill a bottle with water, it is necessary first to remove its cap."
(c) and (d) are just the word "bottle" plus a clause that describes the bottle.
As for (b), there are few situations where "which" is needed. The phrase "a bottle to fill with water" will make perfect sense in most cases. However, it makes sense to use "which" in a situation like this:
"That bottle is broken. It is a bottle to fill which with water would be dangerous."