In electrolysis, does it make any difference if the electrolyte is an molten, aqueous or dilute aqueous solution?
In molten sodium chloride, the only available ions are $\ce{Na^+}$ and $\ce{Cl^-}$. With electrolysis, the products will be sodium metal and chlorine gas. 

In an aqueous solution, the sodium chloride still moves the charges from one electrode to the other, but the potential for electrolysis of water is less than $\ce{Na^+}$ or $\ce{Cl^-}$. So the products of a solution of sodium chloride is hydrogen gas and oxygen gas.