Technically it depends on the levelized cost of hydrogen, which encompasses capex, opex, and a slew of other relevant inputs. Similar "levelized cost" formulas are used throughout the utility sector to make these kinds of decisions; what makes green hydrogen unique is simply that it is undergoing a spike in research and development right now that is drastically changing some of the inputs to the LCOH equation.
This are good models for roughly continual usage of the equipment, but they don't model the use cases of operating capacity factors less than 60% for electrolysis, and it's likely that the capacity factor of electrolysis equipment powered by excess wind would be <10%. At that point, the capex beings to dominate nearly all other factors.
I in fact used to be somewhat optimistic about hydrogen as a long term storage mechanism for our excess renewables, until I saw models like these from NREL. Now I am extremely skeptical of any hydrogen from electrolysis unless it's from something like solar+storage facilities. (Which are actually being proposed now, which is very exciting!)
It's the only way to build lots of zero carbon baseload right now. Botch cheaper and faster than nuclear, it also regularly gets deployed with an extremely high success rate. Failure of nuclear builds is a huge huge problem that the industry has not been able to solve.
https://www.nrel.gov/docs/fy09osti/46267.pdf